Solved

Problem with Frames and Scrolling

Posted on 2002-06-07
3
176 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Enroll in May's Course of the Month

May’s Course of the Month is now available! Experts Exchange’s Premium Members and Team Accounts have access to a complimentary course each month as part of their membership—an extra way to increase training and boost professional development.

Question has a verified solution.

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

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 …
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
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…
Suggested Courses

732 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