How to reference functions on another page as a hyperlink

dwarner8
dwarner8 used Ask the Experts™
on
My html page is cluttered with javascript and I would like to reference this as a link to another page via a hyperlink.  This would clean things up a bit.  I read somewhere about this and now I can find it.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Finance Systems Developer
Commented:
You could put your <script> contents as files like:
<script src="myscripts.js"></script>
where myscript.js looks like:

function myfunc() {
// body of function
}
var myvar="somevar";
// NO SCRIPT TAGS IN THE FILE

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial