Inserting java script

Random stuff about serendipity. Discussion, Questions, Paraphernalia.
Post Reply
johnsore
Regular
Posts: 10
Joined: Tue Apr 18, 2006 1:16 pm
Contact:

Inserting java script

Post 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?
http://www.johnsore.com/ John Sore - personal website & animation stuff
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Inserting java script

Post 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
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
johnsore
Regular
Posts: 10
Joined: Tue Apr 18, 2006 1:16 pm
Contact:

Post by johnsore »

Hi Garvin!

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

Cheers,
John
http://www.johnsore.com/ John Sore - personal website & animation stuff
Post Reply