update text box using Javascript

240 pts.
Tags:
JavaScript
Web development
I have a script which select from database and display customer name in dropdown list I want update the email field(textbox) with the customer email address the script run javascript function top.frPrint.location.href = '/form.php?action=".FIND_EMAIL."&id='+idCustomer; in external php code and return the email address , I cannot update the textbox with the customer email I'm using document.getElementById('customerEmail') is there other thing before document.getElementById I should use?? Thanks for you Help
ASKED: February 2, 2009  6:29 PM
UPDATED: March 25, 2009  7:41 PM

Answer Wiki

Thanks. We'll let you know when a new response is added.

Is customerEmail the id of your text box input?

If you’re using a form you’re probably using the name attribute and not the id attribute. If your text box is named customerEmail then you should access it as document.[form name].[input name].value = xxx, where input name is customerEmail.

Discuss This Question: 1  Reply

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • Usm
    [...] View original post here:  update text box using Javascript [...]
    0 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following