PDA

View Full Version : I need a javascript maid!


fitnessguy
09-20-2002, 01:54 AM
I have a web page with a lot of javascript functionality in it and I would like to clean up the page. Ie remove some javascript from the <head> & <body>.
Is it possible to transfer the script to a seperate file and call that file from the web page?

It might help to let you know that many functions and variables are currently called within the page for various scripts.

Cheers,
Mike.

umm
09-20-2002, 02:14 AM
--edit--
could you not think of a better subject name!
--end--

no you don't, you need an external *.js file.

You should be able to take out all the script in the head and put it in an extrenal js file. The stuff in the body may or may not need to remain there.

Do a search for 'external js file'

adios
09-20-2002, 02:34 AM
http://www.codingforums.com/showthread.php?threadid=2922&highlight=external+scripts

http://www.pageresource.com/jscript/jxtern.htm :)