Page 1 of 1

text copied from window to another window

Posted: Fri Feb 27, 2009 11:43 pm
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

Re: text copied from window to another window

Posted: Sat Feb 28, 2009 2:40 am
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.

Re: text copied from window to another window

Posted: Sun Mar 01, 2009 7:02 pm
by cade
Thanks for replying. I've tried but it didn't work. Is there any other solution using jquery or mootools?