Jump to content

Select values in popup window, insert into textbox of parent window


Eiolon

Recommended Posts

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
Share on other sites

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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.