Page 1 of 1

Javascript in "body" tag of index.tpl?

Posted: Fri Oct 31, 2008 10:09 am
by pischla
Hi and thanks for this great software of yours! I have tried to get a javascript menu working together with serendipity and failed.

I have a framed layout using a navigation-frame with a javascript menu called "HV menu" to the left and content to the right. To get the menu working like it's intended I need to include a bit of javascript inside the body tag of each page linked from the menu.

The first level of the menu resides in the left frame and the children pops up in the right frame. This works on my static html pages like a charm, but when I try to include it in the index.tpl file all I get is an empty white page when trying to open the blog...

Here is the javascript code to be included in the body tag:

Code: Select all

<body onload="javascript:{if(parent.frames[0]&&parent.frames['leftFrame'].Go)parent.frames['leftFrame'].Go()}">

Here's the menu I'm using:
http://www.dynamicdrive.com/dynamicinde ... /index.htm

Any and all help is welcome to get this thing working....

/Pasi

Re: Javascript in "body" tag of index.tpl?

Posted: Fri Oct 31, 2008 12:14 pm
by garvinhicking
Hi!

Did you replace { with {ldelim} and } with {rdelim} inside the .tpl file?

See http://www.s9y.org/11.html#A32

HTH,
Garvin

Posted: Fri Oct 31, 2008 12:28 pm
by pischla
Wow! I have been searching the forum all day yesterday and didn't find that. Also checked the faq, but missed it. :oops:

Thanks a bunch it works great now!

/Pasi

Posted: Fri Oct 31, 2008 8:40 pm
by pischla
Never, mind! I'm just too drunk it seems... :P