• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Frits Walraven
Bartenders:
  • Carey Brown
  • salvin francis
  • Claude Moore

simple javascript form  RSS feed

 
Greenhorn
Posts: 12
Eclipse IDE Java Postgres Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Greenhorn
Posts: 13
Eclipse IDE Hibernate Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 12
Eclipse IDE Java Postgres Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 13
Eclipse IDE Hibernate Spring
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Put the moon back where you found it! We need it for tides and poetry and stuff. Like this tiny ad:
Create Edit Print & Convert PDF Using Free API with Java
https://coderanch.com/wiki/703735/Create-Convert-PDF-Free-Spire
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!