Controlling what position a page loads in

J

Jason

Matt suggests:

<BODY onload="window.scrollTo(x,y)">

However I am linking to Google Images so I can't modify their page
code.

Is there a way to link from frame a to frame b so that the javascript
in frame a decides and controls at what position the page will load?

Jas
 
R

Randy Webb

-Lost said the following on 1/29/2007 11:54 PM:
You could call it on a target frame. Load Google within a frame or layer and scroll
accordingly.

You will run into a security issue trying to script a frame with Google
in it from a frame that is not from the Google server.

The answer to the original question is a resounding no though.
 
L

-Lost

Randy Webb said:
-Lost said the following on 1/29/2007 11:54 PM:

You will run into a security issue trying to script a frame with Google in it from a
frame that is not from the Google server.

The answer to the original question is a resounding no though.

To the original poster, I apologize. I even tested it before posting to make sure I did
not provide misinformation.

I first tried it locally, loading local pages and then remotely loading pages from the
same server. It never dawned on me that it would not work loading content from another
source (uncaught exception: Permission denied to get property Window.scrollTo). I thought
regardless, your frameset would still "own" the frames. This is only true with content
residing in the same context as Randy pointed out.

Again, sorry about that!

-Lost

P.S. Totally off-topic, if you had a server-side language available you could retrieve
the results (cache them) and output the contents into your frames, then scroll
accordingly.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,774
Messages
2,569,599
Members
45,175
Latest member
Vinay Kumar_ Nevatia
Top