Deaf Topics - Property in Qatar - Free Anonymous Surfing - Free Articles Directory About Cancer - Television News

PDA

View Full Version : Copy form data to another window


tbarr60
Oct 29th 2008, 1:38 pm
We have a process where we copy data from one form in one window into the same form in another window. I can't change the form or any other aspects of the pages as it is a hosted application.

I'd like to create a Javascript function that copies all form fields in one window and pastes into the same form fields in the second window. I am messing around with iFrames as a nice way to lay it out but I am having trouble referencing the fields in the iFrames.

What would be a way to code a copy and paste function that determines the form fields available and copies fields over?

profs77
Oct 30th 2008, 9:34 am
If the fields you are copying/pasting are on different domains, then javascript doesn't allow this. Called cross-site scripting. However with Greasemonkey you could probably do this. Let me know if you want me to program a greasemonkey script. Give me an offer. And the greasemonkey thing would only work on your computer, it wouldn't work as a thing hosted online because of the cross-site scripting security issue.

tbarr60
Oct 31st 2008, 4:13 pm
I am familiar with cross site scripting. In this case, it works somewhat like a Google Tool Bar's Autofill. In this case it would be auto-filling with information it auto-copied from another window.

I still want to work out a Javascript solution but may come back to using Creasemonkey.