• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

simple javascript form

 
Greenhorn
Posts: 12
Eclipse IDE Postgres Database Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Hibernate Eclipse IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 Postgres Database Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Hibernate Eclipse IDE Spring
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
reply
    Bookmark Topic Watch Topic
  • New Topic