PDA

View Full Version : Getting a Autofilled Box to be recognize by onchange


codingForumsFTW
01-03-2010, 01:00 AM
I have auto-suggest that brings down first and last name into a input box, it also brings into another input box the id of the selected item.

on that id i want to be able to auto fill a form from there.

right now i have it set up but and it auto-fills with lets say 55 but it does not execute the code to fill in the form.

however if i type something into that box it fills the form.

my question is how is it possible to have the to see eachother.

<input type="text" id="testid" name="testid" value="" onchange="showUser(this.value)" /></p>

this is the input box that is being filled by auto-suggest and then i want onchange="showUser(this.value)" to execute to fill the form

Gjslick
01-05-2010, 04:02 AM
First, what are you using as your auto suggest?

Second, onchange is not going to fire when the form field is populated via script (such as from your auto suggest). You're going to have to work with whatever you're using to run that showUser() function when a suggestion is selected.

Post some more of the working code that you have so far, and we can go from there.