Unanswered: Populate field 2 (run Query) based on input in field 1
Hi there !!
I got a table (Postinfotable) which looks like this :
Postnr | Poststed
In my ASP page, i want to make the user to input (text field) a "Postnr" and when user exits/refresh/onBlur (or anything) the field, it should run a sql query against the Postinfotable with "Postnr" to lookup the correct "Poststed" for that "Postnr" and insert that into the "Postnummer" form-field..
How can this be done ?
If someone has a URL/Webpage/Metods to use i'd be extremely happy.. kinda stuck with this
Yea.. u prolly right, but i've googled this for quite many hours.. Might be that i lack brain to find correct searchwords though
But.. the good news is that i managed to work it out..
using OnChange() event on the "Postnr" field, which triggers a function with an IFRAME (which is _not_ a popup), with "postnr" as parameter.
Using Request.GetParameter("postnr") and put it in a temp variable.
Then i build the SQL query with the temp variable and picks out the Postnr, followed by putting the value into a hidden field on the "IFRAME" form.
End it all with sending the value to the parent form and closing the window..