?
Solved

disable local back button when specific page loads in iframe

Posted on 2009-03-30
3
Medium Priority
?
519 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

Video: Liquid Web Managed WordPress Comparisons

If you run run a WordPress, you understand the potential headaches you may face when updating your plugins and themes. Do you choose to update on the fly and risk taking down your site; or do you set up a staging, keep it in sync with your live site and use that to test updates?

Question has a verified solution.

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

This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
Find out what you should include to make the best professional email signature for your organization.
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…
Suggested Courses

800 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