954,600 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

copy text from Input (in popup) to Parent Window

Is it possible to Copy data from a box the the main windows (the input is opened in a pop-up). I've seen date-time pickers can do that, but can't find the function!

smartness
Junior Poster
103 posts since Aug 2007
Reputation Points: 7
Solved Threads: 14
 

http://www.webreference.com/js/tutorial1/opener.html - you can find everything on this page. but if you will have problems even after reading this just give some more details and I will help you out with the scripting
BDS

smogmaker
Newbie Poster
1 post since Dec 2009
Reputation Points: 10
Solved Threads: 0
 

I found this solution:
Im openin a with a pop-up my crop.php
and then use this button to copy values to main window

<button onclick="javascript:window.opener.document.getElementById('pic').value='value1'; window.close();">Finish &amp; Close</button>


pic is a input box value1 is the new value i want to copy from this window!
Click, Copy & Close ;)

smartness
Junior Poster
103 posts since Aug 2007
Reputation Points: 7
Solved Threads: 14
 

OK now I need a little help.

I want to add content to a

tried with: document.getElementById('text').value='SOMETHING';
but didn't work

[edit] getElementById('text').innerHTML=''; Works, but if I edit the inserted text, or delet it, then it doesn't work anymore

I nned to check If textarea has something written in it, then just add it to the end of textarea, not replace the whole content! ELSE, just add it

Thanks!

smartness
Junior Poster
103 posts since Aug 2007
Reputation Points: 7
Solved Threads: 14
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You