Solved

Problem with Frames and Scrolling

Posted on 2002-06-07
3
172 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

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

In this article, we'll look how to sort an Array in JavaScript, including the more advanced techniques of sorting a collection of records either ascending or descending on two or more fields. Basic Sorting of Arrays First, let's look at the …
In my daily work (mainly using ASP.net), I need to write a lot of JavaScript code. One of the most repetitive tasks I do are the jQuery Ajax calls. You know: (CODE) I don't know if for you it's the same, but for me is soooo tedious to write the …
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…

759 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now