473,811 Members | 3,213 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

IFrame Access is denied when i click "back" on internet explorer

2 New Member
Hi I am trying to get the content of the iframe to replace the content inside a div
here is the code i use.

Expand|Select|Wrap|Line Numbers
  1. function changeContent(content) {
  2.     var buf = content + "_2";
  3.     var iframe = document.getElementById(buf);
  4.     document.getElementById(content).innerHTML = (iframe.contentDocument || 
  5.     iframe.contentWindow.document).documentElement.innerHTML;
  6. }
  7.  
it works great in both firefox and internet explorer,
but when I go to another page, and click on the "back" button on internet
explorer, it gives the "Access is denied" error...
is there anyway to fix it?
Thanks
Jul 31 '07 #1
3 3343
acoder
16,027 Recognized Expert Moderator MVP
Welcome to TSDN!

Is the content in the iframe from another domain?
Aug 1 '07 #2
ysakaed
2 New Member
yes... its from another domain....
Aug 1 '07 #3
acoder
16,027 Recognized Expert Moderator MVP
yes... its from another domain....
That's what's causing the problem. You can't access content in an iframe from another domain.
Aug 2 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

4
6935
by: John | last post by:
Could anyone please help me on this?? I have a php script page, which is basically quiz. Visitors (after login in with their email address) are supposed to answer each question, and when they click the button at the bottom, the next page will show which problems they got right or wrong. Now my visitors, after seeing some problems they got wrong, click Back button at the Explorer menu, and if they do, they get the below message:...
4
1796
by: Nicolas Verhaeghe | last post by:
I have designed an application which uses the Crystal Reports 8.5 ActiveX to show a report as a PDF. The report is compiled from a SQL database populated through web forms programmed in ASP. When the Active X is lauched, a PDF is pushed as a stream to Internet Explorer, which calls the Acrobat Reader plugin to view it. When some of my users click on the Back button to get out of the PDF report,
7
4346
by: George | last post by:
I am trying to set up a login-logout website. I have a cookie about the login status. I put it as logout once the logout link is clicked. And I put a little security check about the status of the cookie variable everytime before loading the detailed member profiling. The page layout is like: Login page,-->check the login name/password database-->profile page(only login cookie is true, redirect back to login if false)
56
5983
by: Raphi | last post by:
Hi, I've been using an Access application I wrote for an office with the front-end stored on all computers and the back-end on one of them serving as an Access file server. Now we're moving to a 2nd office 15 minutes down the road. Only one office will be open at a time, so theoretically it'd be possible to copy the back-end manually every night from one office to another, but frankly, that's pretty annoying.
2
1343
by: Amelyan | last post by:
Sometimes, when I hit the back button on IE, my Page_Load function gets executed. But sometimes, it doesn't. What controls that? Thanks, -Amelyan
0
1999
by: Michael Nemtsev | last post by:
Hi, I need to stay on the current page even if user clicks "BACK" in browser. Opera is very stubborn in attemp of turning cached page off, and using current. Does anybody know the way how to say Opera not to show previous page when I click "Back" button and show current page. Which meta info should be specified?! Currently I use the following code, which works fine with IE and FireFox (no previously cached page is shown)
3
1580
by: Tea Maker | last post by:
Hi, I was wondering if there's a way to call a function when a user presses on the "back" or "forward" buttons of the browsers. What I want is, redirect the user to a new website (let's say thescripts.com), when he tries to click "back" , "forward', "Go", etc.... on my page. Is that possible? And if yes, can you please tell me how to handle these actions, plus what actions are possible (for example I know that it's impossible to do this...
0
3956
by: Summercool | last post by:
right now i have a script that will add to the DOM tree of a form... adding the hidden input values as children... it works well except when i click "BACK", Firefox doesn't remove those objects... (IE 7 and Safari 3 both removed them). So Firefox will actually submit more objects that there really are. so Firefox (2.0.0.8) is the only one causing trouble... is there a way to "force" refresh of the page or reload it? if i refresh...
0
9734
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9607
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10652
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10395
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10408
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9211
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5700
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4346
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
3026
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.