The advantage to using Local Storage is that the copy can work in real time. You can break out one of the tabs into a separate window, so you can see both entry boxes at the same time. Type in the box on the source window, and the text can appear /as you type it/ in the target window. All that would take is an event listener for changes to the input box, and on the target side, an event listener for local storage change, to update the second text box.

On 8/13/2012 4:58 AM, mike cupcake wrote:
On Friday, 10 August 2012 01:09:03 UTC+1, gandahar wrote:


    Let's say I have a html file on my local computer, which contains
    a form
    (f1) and a textarea in it, named t1. I type some letters in it.
    Then I open
    a webpage in a new tab, which also contains a form (f2) and a
    textarea,
    named t2. How can I copy the content of the textarea t1 into the
    textarea
    t2?


Have the script run on both pages. Code page1 to open the URL for page2 + the information in a query string, make page2 read the string and put it into the boxes.

e.g.
http://server.com/page2.htm?mytext=hello

You can use use URIEncodeComponent() to handle special characters/spaces/etc.
--
You received this message because you are subscribed to the Google Groups "greasemonkey-users" group. To view this discussion on the web visit https://groups.google.com/d/msg/greasemonkey-users/-/l5JTlG9b6HcJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/greasemonkey-users?hl=en.


--
You received this message because you are subscribed to the Google Groups 
"greasemonkey-users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/greasemonkey-users?hl=en.

Reply via email to