Solved

disable local back button when specific page loads in iframe

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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

This article discusses four methods for overlaying images in a container on a web page
This article discusses how to create an extensible mechanism for linked drop downs.
In this tutorial viewers will learn how add a full-size background image to a webpage using CSS3. Create a new HTML document with an internal stylesheet.: In CSS, define the html element to have a background image. Use a high resolution image.: In t…
In this tutorial viewers will learn how add a scalable full-width header using CSS3. Create a new HTML document with an internal stylesheet. Set a tiled background.:  Create a new div and name it Header. Position it with position:absolute at the top…

760 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

20 Experts available now in Live!

Get 1:1 Help Now