Create an external .js file -
07-28-2003
, 10:18 AM
Hello,
I have an html page with a javascrit function witch validate passwords.
In the same page i have a form with a button, and in the onclick method, i
call this function.
Everything works fine, but anyone can see the algorithm by looking at the
source. I'd like to pass the script function to an external file say
passwordchek.js.
what steps must i do? To create the js file, is it sufice to copy the
javascript portion to it? How should i refer the 'link' to the external js
file in my page? How should i call the function in the onclick method of the
button?
sorry if this are very simple questions, but i'm rather new to javascript,
and i'm in a real hurry.
Thanks in advance
Hugo Sousa |