Click to See Complete Forum and Search --> : Too big javascript
gotfrid_mc
12-04-2003, 08:59 AM
The situation is that I have a rather big/long javascript in my html file and I would like to find a way to make it easier to download my page. What would be the best thing to do? :confused: If you could give me some suggestions or an idea where I can find info on coping with this problem. I would be grateful. Thanks.
jochem
12-04-2003, 09:16 AM
If the script is being used in more than one HTML page, you might considder creating an external .js file. Then, just call on it from each HTML page that needs the script, just like an external .css file.
<script language="JavaScript" src="yourscript.js"></script>
Cheers, Jochem :cool:
Paul Jr
12-04-2003, 12:05 PM
I believe the "language" attribute has been deprecated (http://www.w3.org/TR/REC-html40/interact/scripts.html#h-18.2.1).