Quantcast

Maximum PC

It is currently Sat Oct 25, 2014 1:28 pm

All times are UTC - 8 hours




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: HTML gurus, please help
PostPosted: Tue Aug 10, 2004 10:34 am 
Little Foot
Little Foot

Joined: Sun Jun 27, 2004 7:11 am
Posts: 124
Location: 127.0.0.1
Hi HTML gurus,

I need some help here. Please let me know if this is doable, and why.

I want to automate some process. Basically, I would write an HTML file to have two frames, the upper frame containing another HTML/JavaScript file that I wrote, and the bottom frame would load a page from a 3rd party website.

I was hoping that after the bottom frame got loaded, the javascript in the top frame would be able to examine the contents of the bottom frame, and do different things accordingly.

Code:
var x = window.top.bottomframe.document.body.innerHTML;

// bottomframe is the name of the bottom frame
// parse x to do whatever


but everytime I run the javascript, it gives me an error saying something about access violation. Is it because the contents of the bottom frame belongs to a different domain and therefore my own code won't be able to access it? Is there a way to get around it? thanks


Top
  Profile  
 
 Post subject:
PostPosted: Tue Aug 10, 2004 10:46 am 
Monkey Federation (Top 10)*
Monkey Federation (Top 10)*
User avatar

Joined: Thu Jun 24, 2004 1:22 pm
Posts: 27384
Location: In a cage, dumbass.
Can you post the link to the third party page that you are talking about?


Top
  Profile  
 
 Post subject:
PostPosted: Tue Aug 10, 2004 10:59 am 
Little Foot
Little Foot

Joined: Sun Jun 27, 2004 7:11 am
Posts: 124
Location: 127.0.0.1
this was the link, but I cannot open it anymore.

http://gmailraffle.variantdata.com

basically it is a lotto for getting a gmail invite. I was hoping to writing a script to process it automatically, but apparently it did not work and I didn't get the invite.

now gmail don't matter anymore, and I am more interested in why it didnot work.


Top
  Profile  
 
 Post subject:
PostPosted: Tue Aug 10, 2004 1:52 pm 
Bitchin' Fast 3D Z8000*
Bitchin' Fast 3D Z8000*
User avatar

Joined: Tue Jun 29, 2004 11:32 pm
Posts: 2555
Location: Somewhere between compilation and linking
Something like this right (except you only want one window in the bottom frame, not 20)?

How funny is that.... MSN uses Java for their fantasy leagues... haha. :)

http://games.espn.go.com/content/ffl/20 ... ejavadraft
http://games.espn.go.com/content/fhl/20 ... ejavadraft


Top
  Profile  
 
 Post subject: Re: HTML gurus, please help
PostPosted: Wed Aug 11, 2004 3:15 pm 
Thunderbird
Thunderbird
User avatar

Joined: Wed Jul 07, 2004 1:13 pm
Posts: 817
Location: Missouri
emanresu wrote:
Hi HTML gurus,

I need some help here. Please let me know if this is doable, and why.

I want to automate some process. Basically, I would write an HTML file to have two frames, the upper frame containing another HTML/JavaScript file that I wrote, and the bottom frame would load a page from a 3rd party website.

I was hoping that after the bottom frame got loaded, the javascript in the top frame would be able to examine the contents of the bottom frame, and do different things accordingly.

Code:
var x = window.top.bottomframe.document.body.innerHTML;

// bottomframe is the name of the bottom frame
// parse x to do whatever


but everytime I run the javascript, it gives me an error saying something about access violation. Is it because the contents of the bottom frame belongs to a different domain and therefore my own code won't be able to access it? Is there a way to get around it? thanks


I do not believe if I am correct that the window.top is required for your code. Try just bottomframe.document.body.innerHTML; since they are all contained within the same initial document and within frames of that document.


Top
  Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC - 8 hours


Who is online

Users browsing this forum: No registered users and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group

© 2014 Future US, Inc. All rights reserved.