Solved

Problem with Frames and Scrolling

Posted on 2002-06-07
3
175 Views
Last Modified: 2012-06-27
I have a page onload event:

onload="top.scrollTo(0,0);"

Which sends the parent page to the top when this page is an Iframe within the parent.

It works well when I test it in my own parent page/Iframe but when it's online and the parent page is on another domain and server, there is an Access Denied Javascript error.

Any idea why or how I can fix it?

Thanks,
Matt
0
Comment
Question by:cdpMat
3 Comments
 
LVL 22

Accepted Solution

by:
CJ_S earned 50 total points
ID: 7061534
You cannot fix that. Javascript does not allow cross domain calls. Meaning that it will only work if all pages are on the same domain.

The reason it works this wya is because it would otherwise be a big security risk.

CJ
0
 
LVL 12

Expert Comment

by:ahosang
ID: 8276018
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

points to CJ_S
Please leave any comments here within the next seven days.
 
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
 
ahosang
EE Cleanup Volunteer
0
 

Expert Comment

by:modulo
ID: 8360609
Finalized as proposed

modulo

Community Support Moderator
Experts Exchange
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
How can I make a javascript to show drop down 4 22
Running a javascript project in WebStorm 2 29
Responsive Font Size 6 30
Review of the nodejs code 1 18
Avoid defining the variables in the global scope; trying to define them in a local function scope. Because:   • Look-up is performed every time a variable is accessed.   • Variables are resolved backwards from most specific to least specific scope…
This article discusses the difference between strict equality operator and equality operator in JavaScript. The Need: Because JavaScript performs an implicit type conversion when performing comparisons, we have to take this into account when wri…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

820 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question