Go Back   CodingForums.com > :: Client side development > JavaScript programming > DOM and JSON scripting

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 12-01-2012, 03:16 PM   PM User | #1
oddshoes
New Coder

 
Join Date: Aug 2012
Location: France
Posts: 27
Thanks: 9
Thanked 0 Times in 0 Posts
oddshoes is an unknown quantity at this point
Is Refresh page button part of DOM

Are the back button and the refresh button part of the DOM, and if so is it possible to disable them for a particular page? Anticipating the obvious question “why would you want to do that", I have a form into which which users enter data, which then posts the data to a new page which reviews the input, the data having been stored in a MySQL database. To edit the data there is a button to go to yet another page which then pulls the data from the MySQL database and allows the user to edit it. Despite the fact that the edit data button is large and there is bold text entreating the user not to use the back and refresh buttons, a significant number still do. This results in a 2nd record being placed in the database rather than editing the 1st.

Maybe there is a better way round this problem as I am sure it is not unique to me?

All clues greatly appreciated.
__________________
A talent for speaking differently, rather than for arguing well, is the chief instrument of cultural change. Richard Rorty
oddshoes is offline   Reply With Quote
Old 12-01-2012, 08:41 PM   PM User | #2
felgall
Master Coder

 
felgall's Avatar
 
Join Date: Sep 2005
Location: Sydney, Australia
Posts: 5,447
Thanks: 0
Thanked 496 Times in 488 Posts
felgall is a jewel in the roughfelgall is a jewel in the roughfelgall is a jewel in the rough
Quote:
Originally Posted by oddshoes View Post
Are the back button and the refresh button part of the DOM, and if so is it possible to disable them for a particular page?
No they are a part of the browser and therefore belong to your visitor, They are definitely NOT a part of your web page and so you have no control over the refresh button and very limited control over the back button (in that the back button goes back through the history list and you can load new pages that overwrite your prior history entry rather than adding a new one)


The answer to any sentence containing both the word 'JavaScript' and the word 'disable' have the following two answers:

1. No the author of a web page cannot disable it using JavaScript.
2. Yes the owner of the browser can disable or override any JavaScript in any web page.
__________________
Stephen
Learn Modern JavaScript - http://javascriptexample.net/
Helping others to solve their computer problem at http://www.felgall.com/
felgall is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 06:46 PM.


Advertisement
Log in to turn off these ads.