Page 1 of 1

Inserting java script

Posted: Tue Apr 18, 2006 1:38 pm
by johnsore
Hi,

I am currently displaying Serendipity in an iframe as my home page. I would like to insert some javascript to force the frame to be drawn when Serendipty is linked to directly.

Something like:
<SCRIPT LANGUAGE="JavaScript">
<!--
if (top == self) self.location.href = "index.html";
// -->
</SCRIPT>

Is this possible and where would I insert this?

Re: Inserting java script

Posted: Tue Apr 18, 2006 3:21 pm
by garvinhicking
Hi!

Yes, this is easily possible. You can just edit your "index.tpl" template file in your templates directory.

You could also use the "Page Nugget" event plugin to output this, if you want to go the plugin Way.

Best regards,
Garvin

Posted: Wed Apr 19, 2006 10:30 am
by johnsore
Hi Garvin!

Thanks a lot, that worked perfectly. Thanks for your help.

Cheers,
John