Reply
using javascript to prevent
Old 08-19-2005, 06:41 PM using javascript to prevent
amw_drizz's Avatar
Ultra Talker

Posts: 301
Name: Jon
Location: New York
Hi,

I am trying to figure out how to use javascript to prevent users from right clicking and using the backbutton for a test i am creating

any one have any ideas how to do this?
__________________
AMW_Drizz
Php 5.2 Mysql 4.1 IIS 6 Win2k3 Server && PHP 5.2 MySQL 4.1 Apache 2.2 (separate machine of course)
amw_drizz is offline
Reply With Quote
View Public Profile Visit amw_drizz's homepage!
 
When You Register, These Ads Go Away!
     
Old 08-19-2005, 06:46 PM
praveen's Avatar
Life is a Dream

Latest Blog Post:
Accidental Techie
Posts: 3,566
Location: in a distant land far away from reality
here you go for the disable right click

http://www.dynamicdrive.com/dynamicindex9/noright.htm
__________________
Praveen
Web Tools - Smilies - Celebs - Bookmarks - Indian Food - Create a Poll

Useful Threads, Tutorials and Resources
Graphics - Templates - Dreamweaver - Javascript - SEO - Ruby on Rails - Ajax Tutorials - More Ajax - CSS - More CSS
praveen is offline
Reply With Quote
View Public Profile Visit praveen's homepage!
 
Old 08-19-2005, 06:55 PM
Anacrusis's Avatar
Defies a Status

Posts: 2,099
Name: Adam
Location: Colchester CT
You can use the code that praveen gave to prevent right clicking (although pointless because there are numerous ways around this)

As for disabling the back button, I do not think it is possible. Unless somebody else knows a way.
Anacrusis is offline
Reply With Quote
View Public Profile Visit Anacrusis's homepage!
 
Old 08-19-2005, 09:58 PM
Phaedrus's Avatar
Ultra Talker

Posts: 271
Location: CA
One way to disable the back button is to use a forwarder, which is a page in-between the two pages you want to separate.

The forwarder changes the page location when it loads, something like this:
HTML Code:
<html>
<body onload="window.location='whatever.htm';">

</body>
</html>
That way if the person uses the back button, they go to the forwarder, which puts them right back where they were.

This is easily circumvented, of course, but I think it's about the best that can be done.
__________________
Free Teacher Websites
Phaedrus is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to using javascript to prevent
 

Thread Tools

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
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 


Page generated in 0.12260 seconds with 13 queries