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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

getting content from a popup in original window

Status
Not open for further replies.
Jul 28, 2011
167
NG
Hi guys,
I have a little issue here.
I want to focus on a textbox. When I focus, it should launch a popup window that contains a list of predefined selectable items.
Users can select an item; the popup window should close and the original textbox should be filled with the selected value (in the original window).
I've seen this implemented in a certain site before.
I think I can try something with some server-side coding using session state. But I'm thinking this might be easier with some other methods.

Any ideas

____________________
Men put up a strong face just to cover their weaknesses...good!
But a smile makes them live longer....
Which would you choose?

Think about it.
 
why not just use a simple select box?
otherwise you will need javascript which may be switched off by some users & your pop-up may bet blocked by pop-up blockers

you will still need server side coding to confirm that the data you get back is one of the allowed options

Mundus vult decipi decipiatur ergo.
 
Yeah, that's correct. However, the thing is what is to be selected could come from different groups. User checks his group, a display of associated group details(code and description). you select a detail and a text box is populated with the description.

More so its what my boss wants.

Hope you understand.

Thanks

____________________
Men put up a strong face just to cover their weaknesses...good!
But a smile makes them live longer....
Which would you choose?

Think about it.
 
Since his will require JS I suggest you stroll over to forum216 for more specific answers.

As a starting point I suggest a dynamic div which contains the selectable options rather than a popup. That way it isn't blocked by pop-up blockers. However it can still be disabled if JS is not supported or turned off. But that's becoming increasingly rarer these days.

Anyway, the basic gist would be to have whatever you decide retrieve the appropriate options and then simply using a object reference in JS alter the value for the textbox in question.



----------------------------------
Phil AKA Vacunita
----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.

Behind the Web, Tips and Tricks for Web Development.
 
Thanks I found a way out with query strings, and javascript
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top