Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2005-12-20 00:13:47

coffeepostal
Member
From: Anacortes, WA
Registered: 2005-09-06
Posts: 22
Website

JavaScript in Articles, not working so much...

I’m trying to use JavaScript Tooltips on my blog, but I want ones that allow HTML (I’m wanting to allow views to mouse over a name and it displays an image of them).

Anyway, I can use the JavaScript link in the “pages”, but if I add it in a post, it stops the post at the link, as well as causes every other Tooltip to not work. I’ve tried turning off Textile, but that doesn’t seem to make a difference.

Any ideas?

Offline

#2 2005-12-21 00:24:09

coffeepostal
Member
From: Anacortes, WA
Registered: 2005-09-06
Posts: 22
Website

Re: JavaScript in Articles, not working so much...

So, I take it no one has any ideas on the JavaScript thing?

Offline

#3 2005-12-21 02:02:23

zem
Developer Emeritus
From: Melbourne, Australia
Registered: 2004-04-08
Posts: 2,579

Re: JavaScript in Articles, not working so much...

Textile doesn’t understand Javascript, so it’s probably getting confused and mangling it. Put your javascript in a form and use the output_form tag.

btw, you’re probably better off calling the javascript from the article form rather than the article body itself. Articles are for content, not code.


Alex

Offline

#4 2005-12-21 02:04:51

coffeepostal
Member
From: Anacortes, WA
Registered: 2005-09-06
Posts: 22
Website

Re: JavaScript in Articles, not working so much...

Thank you for your help! I really appreciate it!

Offline

#5 2005-12-21 02:24:52

zem
Developer Emeritus
From: Melbourne, Australia
Registered: 2004-04-08
Posts: 2,579

Re: JavaScript in Articles, not working so much...

I expanded on this in the FAQ.


Alex

Offline

Board footer

Powered by FluxBB