Forum Moderators: open

Message Too Old, No Replies

Injecting form data from one frame to another.

Any help would be appreciated.

         

Skryn

12:02 pm on Jun 1, 2011 (gmt 0)

10+ Year Member



I am trying to use javascript to inject the value of a form textarea in my left frame over to a textarea in the right frame.

I found a similar topic which helped, but now that I've moved from a test environment to production, so to say, it's not working.

I can get this to work while testing, but the actual account management system that I am loading in the right frame is buried in it's own iframes, so I'm running into some problems. Also, that system is served from HTTPS, if that's relevant.

Here's a break down of my form in the left frame:

Javascript I am using for the injection attempt.

<script type="text/javascript">
function SendToRight() {
window.parent.rightFrame.SYSTEM.SYSTEM_BOTTOMFRAME.noteform.notetext.value = window.parent.leftFrame.chatsubmit.chatresults.value;
}
</script>


I'm using a text link in the left frame with an onclick to execute that function. It worked while I was using a test page for the right frame.

I'm using a frameset wrapper hosted on my server, which simply is the following:

<html>
<head>
<title>BossNotes</title>
</head>
<frameset cols="30%,70%">
<frame name="leftFrame" src="http://localhost/www/project/notes/index.php"></frame>
<frame name="rightFrame" src="https://sub.systemsite.com/directory/"></frame>
</frameset>
</html>


Yet when I run a simple alert script:

javscript:alert(window.parent.rightFrame.location);


I get blank. It was showing on my test page.

It's like loading the system in that frame has somehow completely destroyed my initial frameset and rightFrame is no longer working. I've tried other simple javascript to interact with the rightFrame to no avail.

Upon viewing the source code of the system's customer page, I see that it is loading a page via iframe, which ia a frameset wrapper.

The name of the iframe is: SYSTEM.

The name of the two frames in the frameset being loaded into the iframe are SYSTEM_TOPFRAME and SYSTEM_BOTTOMFRAME.

The form name in SYSTEM_BOTTOMFRAME is named: noteform
The name of the text area I am trying to inject the date into: notetext.


Maybe because it's 7am and I haven't gone to sleep, but I just can't come to understand what is causing the issue. I've tracked down all of the frames within frames in the account system. It seems like I've linked them all right and that the data should be able to be passed...

Does the fact that my script is server normal HTTP and the account system is HTTPS mean anything? I've seen things that say HTTPS kills frames or something? I don't know.

Any help, insight, advice, criticisms, etc - it's all welcome.

I can provide more information, but it should be evident that I can't provide links or source code of the system. I've changed names above to mask actual text within the system's source code as necessary.

also, please excuse spelling mistakes >.>

JAB Creations

3:57 pm on Jun 2, 2011 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Cross-domain scripting isn't allowed.

- John