It appears you have not yet registered with DEVPPL. To register please click here... (it's fast, easy and free!)

Forum

Log In Sponsors
Board index Programming JavaScript Forum

Newbi needs help with javascript multiole pages

Newbi needs help with javascript multiole pages

Postby rogerrkh on Mon Jan 21, 2008 9:36 am

Hi there
I am a complete newbi at Javascript and have never written any of my own code fot javascript, I have used other peoples javascript on my sites.

My problem is this

One of my web sites will have multiple pages, possible up to 200 pages.

Is there a simple way to point a page to javascript on another page or does each page require its own javasxript. The reason I am asking is that many of my pages will be doing thw same thing with different information and therefor the size of the site will very large if each page requires its own javascript.

Thank you in anticipation.
rogerrkh
 
Posts: 2
Joined: Mon Jan 21, 2008 9:02 am
Location: Bournemouthm England

Postby flabbyrabbit on Mon Jan 21, 2008 11:13 am

You can save the javascript you need on each page in one file. Then you will only need to put one line at the top of each page and the javascript will be added to all the pages.
Code: Select all
<script src="file.js"></script>

Flabby Rabbit
User avatar
flabbyrabbit
500+ Club
 
Posts: 706
Joined: Thu Jan 25, 2007 1:10 pm
Location: Midlands, England

Postby rogerrkh on Mon Jan 21, 2008 11:16 am

Thanks this is exactly what I needed to know.
rogerrkh
 
Posts: 2
Joined: Mon Jan 21, 2008 9:02 am
Location: Bournemouthm England


Who is online

Users browsing this forum: No registered users and 4 guests