HTML Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsWeb DesignHTML Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old June 24th, 2000, 12:04 AM
rkmarcks rkmarcks is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2000
Posts: 81 rkmarcks User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 9
Send a message via AIM to rkmarcks
In previous posts, I've answered the subject question by saying:

******************************************
I don't believe you can actually disable the 'Back' button. But you can delete the history object rendering the 'Back' button useless.
<a href="#" onclick="window.location.replace(url)">

This line of HTML code refreshes the current page AND deletes all history; so there's nothing to which to go back!
*******************************************

After reading other posts stating this doesn't work, I've been investigating. Both NS and IE document this as I stated above [between the asterisked lines]. However, we've not been able to get it to work properly. Either the documentation is wrong (Both browsers??) or there is some little 'trick' to doing this. This 'method' of deleting history is under investigation and I will keep this list posted as to the results.

Russ

Reply With Quote
  #2  
Old June 24th, 2000, 09:34 PM
Spookster Spookster is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 1999
Posts: 84 Spookster User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 9
Well if you are using the # to null out the href that is probably where you are having problems. Try putting the replace method in the href instead and you shouldn't have any problems.

<a href="javascript:window.location.replace('nextpage.html');">

Spookster

------------------
Visit the WSAbstract Help Forum for your Javascript, DHTML, or General Web Design Questions

Reply With Quote
  #3  
Old August 16th, 2000, 07:28 PM
smmorrow smmorrow is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2000
Location: Pennsylvania, USA
Posts: 37 smmorrow User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 24 m 15 sec
Reputation Power: 9
How would this work with a form that is being auto-submitted: i.e., document.form.submit()?
I have an application (perl-cgi with embedded javascript) that takes the CC information that has been entered on the final screen, does some processing (saves the CC information), then auto-submits a form with the hidden fields necessary to send to the CC processor. When it returns from the CC processor, the visitor receives a confirmation screen. If they would press the browser back button, the form would actually be re-submitted - and I don't have the ability to do any checks to prevent that (it doesn't go back to the routine that builds the form and submits it - it returns to the actual form submission itself, and is re-submitted to the CC processor).
In this scenario - it doesn't appear that the location replace() method would work(especially since this is cgi-driven).
Isn't there a way when a page is loaded to provide for the detection of the browser back button being pressed, like you can when you are trying to detect (for instance) a mouse right-click?

scratching my head......
Sharon

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignHTML Programming > Disabling the Back Button - Error


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway
Stay green...Green IT