Eiolon Posted July 9, 2010 Share Posted July 9, 2010 I am not sure what this is called so I can't find anything on Google about it. But as an example, in some webmail systems, a user can click the TO link and a popup window with a list of their contacts will appear. They can then select the contacts via check box and then have it applied to the text field in the TO field on the parent window. Any ideas on how to go about doing that? Link to comment https://forums.phpfreaks.com/topic/207280-select-values-in-popup-window-insert-into-textbox-of-parent-window/ Share on other sites More sharing options...
Eiolon Posted July 9, 2010 Author Share Posted July 9, 2010 I have this semi-working. I have the name being put in the TO field but I do not have the actual record ID of the name being sent to it. My code: <a href="#" onclick="window.opener.document.add.employee.value=window.opener.document.add.employee.value+'<?php echo $row_employees['name']; ?>; ';"><?php echo $row_employees['name']; ?></a> If I change: <?php echo $row_employees['name']; ?> to <?php echo $row_employees['id']; ?> it simply sends the ID to the text box but not the name. Link to comment https://forums.phpfreaks.com/topic/207280-select-values-in-popup-window-insert-into-textbox-of-parent-window/#findComment-1083858 Share on other sites More sharing options...
JasonLewis Posted July 10, 2010 Share Posted July 10, 2010 Well what do you want to send? The name or the ID? Link to comment https://forums.phpfreaks.com/topic/207280-select-values-in-popup-window-insert-into-textbox-of-parent-window/#findComment-1083903 Share on other sites More sharing options...
Eiolon Posted July 10, 2010 Author Share Posted July 10, 2010 In the background, I want to send the ID but I want the name displayed for the user. Link to comment https://forums.phpfreaks.com/topic/207280-select-values-in-popup-window-insert-into-textbox-of-parent-window/#findComment-1084070 Share on other sites More sharing options...
JasonLewis Posted July 12, 2010 Share Posted July 12, 2010 You'll have to add a hidden input box to store the ID in, so you can send back the ID and store that in the hidden input box so the user cannot see it, then show the name in the other input box which the user can see. Link to comment https://forums.phpfreaks.com/topic/207280-select-values-in-popup-window-insert-into-textbox-of-parent-window/#findComment-1084663 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.