problem with form!!!

A

Anonymous

Guest
h
i want to create a form,include a pop-up menu and some text field, i need when a user choses an item from pop-up menu some of text fieds to be filled out from database themselves
how can i do it?
thanks
 
Use window.opener object in popup window. You can sumit some form in parent (opener) window with selected list value or add that value in parent window address using window.opener.location.href to recieve it by $_GET parameter. AJAX is also solution to fill data smoothly.
 
If that information coming from the DB will be used in that same window (pop-up) and depending on the amount of information (if few), you can SELECT it previously and populate them in a JavaScript array so it i will give you a real time like option selection.

You an use the above even if the window target will be the opener. If so and like GedroX said, use window.opener property to fill the fields in the opener window.

I think theres no need for using Ajax. Of course... depending on the amount of information.
 
Back
Top