Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Load js script once, for all pages

Status
Not open for further replies.

dpdoug

Programmer
Joined
Nov 27, 2002
Messages
455
Location
US
Is there a way to load a js file when an application first loads up and make it publicly accessable to all pages in the site, without having to reference it at the top of every page?
 

Yes - using a frameset. You can load a library JS file (for example) in a top frame, and reference it from all other frames.

I have used this to good effect before, but only specifically where we had a pre-existing frameset. Sometimes the use of frames is not within the spec, so you'd need to check that out first.

Hope this helps,
Dan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top