Insert Address from Popup window

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
loonyew
Forum Newbie
Posts: 4
Joined: Tue Mar 24, 2009 11:51 am

Insert Address from Popup window

Post by loonyew »

Hi,

I have tried to search on the web for few days.....can't get to something like this

i have a page which have a textbox letting user key in email addresses and there is a link beside the box which will popup another small window with addresses in the database.

I have problem putting the selected email address values back to the textbox after the user clicked Ok button.

anyone has any idea?

TQ
User avatar
pickle
Briney Mod
Posts: 6445
Joined: Mon Jan 19, 2004 6:11 pm
Location: 53.01N x 112.48W
Contact:

Re: Insert Address from Popup window

Post by pickle »

This would be Javascript, which is in the Client Side forum.

Thread moved.
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
User avatar
pickle
Briney Mod
Posts: 6445
Joined: Mon Jan 19, 2004 6:11 pm
Location: 53.01N x 112.48W
Contact:

Re: Insert Address from Popup window

Post by pickle »

In Javascript, you can refer to the window.parent as a document, so I think you can do:

Code: Select all

window.parent.getElementById('id-of-field-that-holds-email-address').value = 'new-email-address';
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
loonyew
Forum Newbie
Posts: 4
Joined: Tue Mar 24, 2009 11:51 am

Re: Insert Address from Popup window

Post by loonyew »

pickle wrote:In Javascript, you can refer to the window.parent as a document, so I think you can do:

Code: Select all

window.parent.getElementById('id-of-field-that-holds-email-address').value = 'new-email-address';

ohh....Thanks for the info....will try it out....
Post Reply