The assessment is loaded with in a page with no chrome(ie no address bar, back or forward buttons, etc etc) just the page.
How do you achieve that - modern web browsers don't normally allow web pages to be loaded like that as it presents huge security risks.
The only way that could be achieved would be if you were responsible for configuring the computers where the page is going to be loaded and configure the browsers in kiosk mode - then and only then would you have the sort of control where a JavaScript would work to achieve the desired result and in that situation no server to host the pages would be required as they could be hosted on the individual computers.
That sort of environment is completely different from where the pages are running off the internet. Of course with that setup it is also impossible for the page to lose the focus and still be available - with kiosk mode no other programs apart from the browser window can be accessed until after the browser is closed.
And in any case, even without those controls there is still F5. Page refresh. Or, for that matter, hit the BACKSPACE key when the focus is on the page, not on any sub-element thereof.
Or or or...
Truly, this needs at least *SOME* server-side support.
__________________
An optimist sees the glass as half full.
A pessimist sees the glass as half empty.
A realist drinks it no matter how much there is.
And in any case, even without those controls there is still F5. Page refresh. Or, for that matter, hit the BACKSPACE key when the focus is on the page, not on any sub-element thereof.
Or or or...
Truly, this needs at least *SOME* server-side support.
Yes that refreshes the page but let me explain why it wont work for the user to do that. These are assessments which may have as many as 8 sections in them. Each one is displayed on the same page. Once the user gets to the actual assessment they never leave that page because it is using a postback to postback to the same page. Now the very first section is NOT timed. It is also the most time consuming part of the assessment as far as the user is concerned. Everything is controlled by a VB class that I wrote. The class determines what section they should be displayed depending on the assessment, what sections they have already finished and the language of the assessment (they are also in French, German, Swedish, Portugese and two different Spanish dialects.) Once the user refreshes the page the section they were on is gone from view. Should someone answer some questions and submit the page each question that is not answered is assigned a zero value. Now no matter what happens I do not allow them to change any answers once the page has been submitted because within the SPROCS that handle all of the database inputs, I am testing for null values for that record before the various section's answers are saved. There are no updates so if it doesn't come back null the data is not saved.
Perhaps there was a better way of doing this but when I wrote it, I knew what was previously in place and it was a nightmare and my solution worked.
A few years ago I had a boss that is an instructor at one of the local Community colleges. He likes to ask his students what the definition of 5 is. Now some of you may say it is an integer, others may say it is a prime number others may say it is the square root of 25, others may say it is the sum of 1+1+1+1+1, others may say it is the product of 15 / 3. You are all correct but some ways of getting to 5 are better than others are. That is like programming, some solutions are better than others are even if multiple solutions work.
I value your suggestions Bill, and always have going back to the days when aspmessageboard was the only site to get asp answers.
Now the reason I have not set it up to be server side is to be honest I don't know how to make a server side timer using classic asp
Please don't mention .Net because it is not an option