Solved

disable local back button when specific page loads in iframe

Posted on 2009-03-30
3
509 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

Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Add a little space on either side of a table. 12 25
How do I show a login page over the login page? 5 40
CSS question 4 27
CSS for Popup in ASP.NET 4 18
This article discusses four methods for overlaying images in a container on a web page
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…
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)

733 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