Convert HTML to .Js

View previous topic View next topic Go down

Convert HTML to .Js

Post  Bad Wolf on Fri Nov 23, 2007 7:29 pm

http://help.angel.msu.edu/tips/javascript/convert.php

/**edit**/
i've have discovered that the script generator used by the site sometimes cause errors when combining Multiple JavaScripts due to ' spaces ' put between the individual scripts or line breaks .. if this occurs, please refer to this manual process:

Start with your single/individual scripts
<script src="http://www.myhost.com/myJSfile.js"></script>
<script src="http://www.myhost.com/myJSfile2.js"></script>
<script src="http://www.myhost.com/myJSfile3.js"></script>
<script src="http://www.myhost.com/myJSfile4.js"></script>


Change over to This:
document.write('<script src="http://www.myhost.com/myJSfile.js" language="javascript"><\/script>');
document.write('<script src="http://www.myhost.com/myJSfile2.js" language="javascript"><\/script>');
document.write('<script src="http://www.myhost.com/myJSfile3.js" language="javascript"><\/script>');
document.write('<script src="http://www.myhost.com/myJSfile4.js" language="javascript"><\/script>');


save the combined scripts as one JS file then enter it into your sites/forum description area
<script src="http://www.myhost.com/myCOMBINED_JSfile.js" language="javascript"></script>

_________________

Bad Wolf
Developer
Developer

Female
Age: 31
Number of posts: 1344
Location: The Evil Empire

Reputation: 6
Usage Points: 122
Registration date: 2006-12-24

Cprofile
Title: The Digital Alchemist
Luck:
555/555  (555/555)
Karma:
670/777  (670/777)

View user profile http://www.darkfx.com

Back to top Go down

View previous topic View next topic Back to top


Permissions of this forum:
You cannot reply to topics in this forum