Solved

disable local back button when specific page loads in iframe

Posted on 2009-03-30
3
514 Views
Last Modified: 2012-06-21
I have a back button on my main site.  I have a blog (with blogger) that loads into an iframe.  I also have a cname from my site pointing there, so blog.mysite.com.  I'm assuming the browsers are referencing it as a different site.  So that's what I'm trying to do, disable the back button once my blog is up, but have it enabled any other time.  I've tried multiple things that I think should work, but none have so far.  I figured I could pass a function from the blog site up to the parent, but nothing so far.  Thanks in advance
0
Comment
Question by:pro-tek
[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 17

Expert Comment

by:Thomas4019
ID: 24025666
If what you are tying to do is prevent the person from accidently hitting back then i think you should use the window.onunload javscript event. I dont think there is any good way to disable the back button otherwise.
0
 
LVL 12

Expert Comment

by:Dimitris
ID: 24026600
Yes the back button can not be disabled in any way.

Only the Javascript as Thomas says is a solution but I don't know if its a good idea because you may create a kind of annoying message for the users...
0
 

Accepted Solution

by:
pro-tek earned 0 total points
ID: 24027494
It's a scripted back button, not the browser back, so what I ended up doing was made another page1 (on my domain) put the script in to dissable the back button on my page and nested blog.mysite.com on that page1. Then on the main page the src is now page1 instead of blog.mysite.com and that took care of it.  
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
This article discusses how to create an extensible mechanism for linked drop downs.
In this tutorial viewers will learn how to position overlapping items using z-index in CSS. They will also learn the restrictions on the z-index property.  Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Red.…
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…

707 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