text copied from window to another window

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
cade
Forum Commoner
Posts: 55
Joined: Tue Jul 03, 2007 8:18 pm

text copied from window to another window

Post by cade »

Hi guys

I have a page which will need visitor to clicks on a link to see sample text. Now I have problem on realizing idea on how to copy text from popup window and it automatically closes the popup window and the text copied will be paste to the main window.

Process: A user click on the link to bring the popup which will display all the sample text. Let's say on the popup page, user clicks on the button to copy the sample text. Javascript will copy the sample text to clipboard and automatically close the popup window. The text copied will be pasted inside the textarea in the main page

Appreciate you guys can provide support for this. Thanks
User avatar
susrisha
Forum Contributor
Posts: 439
Joined: Thu Aug 07, 2008 11:43 pm
Location: Hyderabad India

Re: text copied from window to another window

Post by susrisha »

i am not sure if this will help but i had a date picker which i needed a similiar functionality. The value of date to be copied on to the text area of the form.

i think it goes on these lines

Code: Select all

 
button.onclick(copytomain);
copytomain()
{
parent.textareaname.text="your copied text";
}
 
This is not a working code.. but i am just trying to put you in those lines.
cade
Forum Commoner
Posts: 55
Joined: Tue Jul 03, 2007 8:18 pm

Re: text copied from window to another window

Post by cade »

Thanks for replying. I've tried but it didn't work. Is there any other solution using jquery or mootools?
Post Reply