Click to See Complete Forum and Search --> : Calling Javascript from html


cdn415
03-31-2003, 04:37 PM
Hey I am trying to call the same script twice in my page. I am using <head><script type="text/javascript" href="sw.js"></script><script type="text/javascript" href="sw2.js"></script></head> but only the last one works. I tried switching the places but still does the last one. The scripts are the same except for the password I choose and the url it goes to. What can I do to fix it?

gil davis
03-31-2003, 04:54 PM
If the scripts are the same, you are wasting your time putting them in the file twice. The last one always replaces the functions and variables created by the first one if the names of those items are the same. That's just the way it works.

Why do you think you have to have the script in there twice?