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 October 5th, 2000, 05:45 PM
grahamfx grahamfx is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2000
Location: Preston,Lancashire,United Kingdom
Posts: 1 grahamfx User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
I'm running a quiz, which people can add to their own web pages by installing some code shown below. This works perfectly and opens a new window, sized 500 x 400 with no menus or scrollbars, and the right mouse button is disabled. This stops people going "Back" on their browsers when they get a question wrong.

The problem is that if they just copy the URL from within the code and paste it into their browsers, something like,
http://www.planetquiz.co.uk/catpage.shtml

They get the page full screen and can start taking the quiz, and simply hit the "Back" button on their browsers if they get a question wrong.

Is there anyway of either, stopping people going back by doing something like removing the items from the history ??

Or when the quiz loads, checking if the window has toolbars etc and throwing an error message if it has ??

<script language="JavaScript"><!--
function myopen(filename,windowname,properties) {
mywindow = window.open(filename,windowname,properties);
}
//--></script>

<a href="javascript:myopen('http://www.planetquiz.co.uk/catpage.shtml','Quiz','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resi zable=no,copyhistory=no,wid th=500,height=400,top=20,left=150')">
<IMG SRC="http://www.planetquiz.co.uk/logos/logo2.gif" border=0 hspace=0 vspace=0></A>

Reply With Quote
  #2  
Old October 8th, 2000, 04:16 PM
tvanbart tvanbart is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2000
Posts: 35 tvanbart User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 8
Yes, it seems that you can test the properties:
self.menubar.visible
self.toolbar.visible
self.locationbar.visible
etc...
for true of false.

See http://developer.netscape.com

You can go to a URL w/o generating history by using the Location.replace method. I don't think you can delete items from the history array, though.

Success, Ton

Success, Ton

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignHTML Programming > Window Status


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 3 hosted by Hostway