HighDots Forums  

Create an external .js file

Javascript JavaScript language (comp.lang.javascript)


Discuss Create an external .js file in the Javascript forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Hugo Sousa
 
Posts: n/a

Default 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



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.