JScript/JavaScript and ASP.net controls

Please support our ASP.NET advertiser: Intel Parallel Studio Home
Thread Solved

Join Date: Mar 2008
Posts: 31
Reputation: BluePaper is an unknown quantity at this point 
Solved Threads: 0
BluePaper's Avatar
BluePaper BluePaper is offline Offline
Light Poster

JScript/JavaScript and ASP.net controls

 
0
  #1
Apr 10th, 2008
Seeing as I like being able to have as much control over the things I make as possible it means I will rarely use the inbuilt ASP.net controls (i.e. the login system provided or the inbuilt verification) I will however use the <asp***> controls in order for my applications to work.

Anyways, to the point, I'm making my own registration page and I want to verify a users password and email by making them enter the data twice. I'd like the application to use real time verification using JavaScript. So I've set up this little bit of JS to compare the two fields, however I need the function to 'run' everytime something in the field changes so I would normally use the onKeyPress or onChange attribute available for normal html tags. When I add an onChange="comparefields()" to an ASP.net tag (in this case <asp:TextBox>) it doesn't like it seeing as it's not one of the things I can add.

So basically:
  • User Enters password
  • User enters password again
  • The application continuously checks to see if the passwords are the same:
  • - If so show a tick
  • - If not show a cross and keep the submit button disabled

I can work on the actual JS side of things, it's just getting the function to run when I want it to run from the textbox tag...I hope I explained myself, if not please do say and I'll try again, thanks.
Stone In Focus - CoffeePHP - Onyx - Redpoint Network - Espresso

University of Exeter Student
Renewable Energy BSc
ap357@ex.ac.uk
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:



Other Threads in the ASP.NET Forum
Thread Tools Search this Thread



Tag cloud for ASP.NET
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC