Solved

Problem with Frames and Scrolling

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
initialise the object angular2 4 35
Angular.js example vocabulary extensions 5 35
how would you interpret lines 3 30
is this a cms? 8 36
When you need to keep track of a simple list of numbers or strings, the Array object is your most direct tool.  As we saw in my earlier EE Article (http://www.experts-exchange.com/A_3488.html), typical array handling might look like this: (CODE) B…
JavaScript can be used in a browser to change parts of a webpage dynamically. It begins with the following pattern: If condition W is true, do thing X to target Y after event Z. Below are some tips and tricks to help you get started with JavaScript …
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…

864 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

23 Experts available now in Live!

Get 1:1 Help Now