Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / HTML, CSS, Scripts / JavaScript / January 2007



Tip: Looking for answers? Try searching our database.

Controlling what position a page loads in

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Jason - 30 Jan 2007 00:36 GMT
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
-Lost - 30 Jan 2007 04:54 GMT
> Matt suggests:
>
[quoted text clipped - 5 lines]
> 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
Randy Webb - 30 Jan 2007 12:57 GMT
-Lost said the following on 1/29/2007 11:54 PM:
>> Matt suggests:
>>
[quoted text clipped - 8 lines]
> 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.

Signature

Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ - http://jibbering.com/faq/index.html
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/

-Lost - 30 Jan 2007 22:36 GMT
> -Lost said the following on 1/29/2007 11:54 PM:
>>> Matt suggests:
[quoted text clipped - 14 lines]
>
> 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.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.