Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Getting text from text boxes

Status
Not open for further replies.

TheHut

Programmer
Jun 21, 2007
5
GB
How do I get text from the text box in java script. I want to get text from a text box in the bid form onChange. An example piece of code would be nice.
 
to get the value from a form on OnChange you can use something like this

crmForm.all.AccountNumber.DataValue

John O'Donnell, Microsoft CRM MVP, MCSE, MCSA
MBS Certified Master–Applications for Microsoft Dynamics CRM
MBS Certified Master–Installation & Configuration for Microsoft Dynamics CRM
Crowe Chizek and Company LLC
Web:Blog:
 
John,

Thanks, that works a treat. I am now trying to put the cursor back in the box after I have cleared the the text after an incorrect user input. The text clears ok using 'crmForm.all.new_minbidvalue.datavalue = ""' =but the cursor moves onto the next box. Even if I add the code:

crmForm.all.new_minbidvalue.SetFocus

It still wont put the cursor back in the new_minbidvalue text box. Do you know another way? What I want to do is force the user to enter the correct value before moving on to the next box.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top