Is it possible to Copy data from a <input> 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!

8 Years
Discussion Span
Last Post by smartness

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 <input name="article_pic" type="text" id="article_pic" />

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


OK now I need a little help.

I want to add content to a <textarea>

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


This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.