wood burning stoves 2.0*
The moose likes HTML, CSS and JavaScript and the fly likes simple javascript form Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "simple javascript form" Watch "simple javascript form" New topic
Author

simple javascript form

ankur mawandia
Greenhorn

Joined: Jan 10, 2011
Posts: 12

i have a html form and with a few fields
i want to md5 my password field before posting it

here is my code





can some one please tell why my password field in not being md5ied


thanks in advance

may the force be with you
Blaidd Gwael
Greenhorn

Joined: Oct 01, 2009
Posts: 13

One problem is when you click the submit button.
The javascript method writes the result AFTER the form has been submited.

For example if you write



when you click the link it will go to a1.

Replace the submit button with a normal one (type="button").
Try to send the form from javascript after you execute "crypt()". There is a "submit()" method for forms.
Other errors can be present but I think this is the problem.
ankur mawandia
Greenhorn

Joined: Jan 10, 2011
Posts: 12

i made the following changes

added a line


in function crypt

and changed the button type to button to submit but now the form is not geting submitted
Blaidd Gwael
Greenhorn

Joined: Oct 01, 2009
Posts: 13

Try to debug the code. Place alerts before and after every line from the function crypt and see if it gets there.
I recommend Firebug. It's a great tool for firefox that helps you with the javascript errors.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: simple javascript form