Click to See Complete Forum and Search --> : permission errors accross servers


Markallen85
08-28-2003, 05:39 AM
I'm writing a set of pages that has to run between two servers.

one is a global server that is open to the whole internet, but does not have much access to the intranet features. The other is on the Intranet, and has full access to everything

I've written a script that will popup a window and retrieve all the data from the intranet, now I need to find a way of returning a string to the internet page. If they are on the same server I can just do:

window.opener.document.getElementById("Username").value=blah

but as they are on different servers this gets an access error. Does anyone know of a way I can just pass a text value from one page to the other.


My next best option is to copy the output to the clipboard and ask the user to paste it themselves and write another script in the internet server to process it, but this is a much uglier way of getting things done.


any suggestions/comments on how I can get this to work?

thanks
-mark

Charles
08-28-2003, 05:49 AM
Set a cookie using the "path" parameter. See http://devedge.netscape.com/library/manuals/2000/javascript/1.3/reference/cookies.html#1002170.

Markallen85
08-28-2003, 05:53 AM
as I understand it that would just work as a variation of the idea to copy the value to the clipboard. At some point the user would still have to tell the page when the popup had closed so that it would know when to go away and dig out the cookie. I'm hoping there's a a way for the pop-up to directly set the value, or if there's a way of telling it's parent that it just closed so that it can go away and retrieve the value from the clipboard/cookies

but thanks for the suggestion, it's another option for me to start throwing around my brain

thanks
-mark

Charles
08-28-2003, 05:55 AM
You will not get it to work using JavaScript. As you've discovered you are trying to violate security restrictions.

Markallen85
08-28-2003, 05:59 AM
well, thanks for clearing that up for me.


-mark