Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Getting data from form in different frame

Status
Not open for further replies.

sansei

Programmer
Jan 29, 2003
8
PL
Hi!

I have a quite big problem and can't find its solution nowhere in the net.
I think, what I want to do is impossible, but still any help or comment would be greatly appreciated.

I have webpage with two frames called 'topf' and 'midf'.
The top frame stays the same while browsing, while the middle (big one) changes its content. I've put a link to another website so it can be viewed in center frame. All works fine, but I would like to write a special script that stores some data a person enters when browsing that website.
It appears Internet Explorer doesn't allow me to check content of form in different frame if its location lies in other domain that the top frame.
I checked the script I wrote and it works fine if the bottom frame is my website, but if its some other website IE jumps with an error ("Denial of service" or something like that in english).
Here is the simplest code for illustrating this:
This code is in top frame:

function ch_f() {
if (top.midf.document.reg_form) {
if (top.midf.document.reg_form.name_edit.value != "") {
alert(top.midf.document.reg_form.name_edit.value)
}
}
}
As you can guess the alert works only if the mid frame web page originates from the same domain as the top one. If I try to access some other webpage (with proper form name of course) I get an IE Javascript error.

Am I right that IE doesnt allow to do this for security reasons ???
Maybe someone know how to bypass this.

I really need to solve this one, becouse I think someone is cheating me and doesn't pay the right money. With this solved I would be able to verify how many people browsing my site register on a website of each of my partners (in midf frame), and if they are as honest as they say.

Sorry for my bad english I didn't have an opportunity to use it in a while.

thanks for any comments

sansei
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top