473,320 Members | 1,955 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Controlling what position a page loads in

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

Jan 30 '07 #1
3 3153
"Jason" <ja*******@gmail.comwrote in message
news:11**********************@a75g2000cwd.googlegr oups.com...
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?
You could call it on a target frame. Load Google within a frame or layer and scroll
accordingly.

-Lost
Jan 30 '07 #2
-Lost said the following on 1/29/2007 11:54 PM:
"Jason" <ja*******@gmail.comwrote in message
news:11**********************@a75g2000cwd.googlegr oups.com...
>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?

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.

--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ - http://jibbering.com/faq/index.html
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Jan 30 '07 #3
"Randy Webb" <Hi************@aol.comwrote in message
news:-K********************@telcove.net...
-Lost said the following on 1/29/2007 11:54 PM:
>"Jason" <ja*******@gmail.comwrote in message
news:11**********************@a75g2000cwd.googleg roups.com...
>>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?

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.
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.
Jan 30 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Martien van Wanrooij | last post by:
I have been using in a lot of websites a script that creates a menu bar but avoids that the button to the current page can be clicked. I am rather satisfied with it (although suggestions for better...
1
by: Philippe V. | last post by:
Hi I need to be able to control the position of the scrolling bar when I move from one page to another page For example, when I click on a button to process a special action done in a second...
6
by: | last post by:
Hi all, I have a long web form on asp.net 2.0. When I go at the bottom and click on submit, a postback occurs and if there are any validation errors (no client-side checking being done), the...
8
by: GaryDean | last post by:
We have been noticing that questions on vs.2005/2.0 don't appear to get much in answers so I'm reposting some questions posted by some of the programmers here in our organization that never got...
3
by: Herb | last post by:
I've found how to use javascript to embed a Windows Media Player in a web page. How do I go about controlling the player in response to user input? There should be calls to start, stop and also...
5
by: RobertK | last post by:
I have a table that displays one row of images (thumbnails). When a user clicks on an image it opens up a bigger image below it. The row has about 20 cells. I have a <divtag which allows the user...
3
by: Akhenaten | last post by:
Is there a way to set the default mouse position on a page when the page loads?
2
by: Brent | last post by:
I have a child page opened with a simple open() statement. I'd like to be able to refresh the parent page and keep the current scroll position. (If I do an "F5" refresh on IE, for instance, the...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.