Welcome to Geeklog, Anonymous Sunday, December 22 2024 @ 09:28 pm EST

Geeklog Forums

Can I run a javascript on every page?


Anonymous

Anonymous
I have some javascript that I want to execute every time a page loads. Can anyone tell me how to do this? I don't know PHP but I'm not afraid to edit any files. Thanks in advance
 Quote

Status: offline

jadiepoo

Forum User
Chatty
Registered: 01/11/03
Posts: 43
just insert the script in the head of the header.thtml in your template. (usually public_html/layout/XSilver/header.thtml)
 Quote

Status: offline

rawdata

Forum User
Full Member
Registered: 02/17/03
Posts: 236
Yeah, and if you want it to execute everytime the page loads just add the call to the body tag like this (replace func with your function name): <body inload="func();" >
 Quote

Anonymous

Anonymous
yeah, right now i got it running in a block but it kinda looks ugly having a blank block frame there. I'll move it to the header.thtml though. Thanks.
 Quote

Status: offline

chief123

Forum User
Chatty
Registered: 05/02/03
Posts: 58
Is there a way to put JS on certain GL pages? I assume you can do this on certain static pages, yes?
 Quote

All times are EST. The time is now 09:28 pm.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content