Go Back   CodingForums.com > :: Client side development > JavaScript programming

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 01-26-2013, 12:13 AM   PM User | #16
Old Pedant
Supreme Master coder!

 
Old Pedant's Avatar
 
Join Date: Feb 2009
Posts: 23,168
Thanks: 59
Thanked 3,993 Times in 3,962 Posts
Old Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to all
Ouch! Yes, I know too well. I *am* the IT department for current company. One guy who does HTML only, but that's it.
__________________
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.
Old Pedant is offline   Reply With Quote
Old 01-26-2013, 12:52 AM   PM User | #17
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 miranda View Post
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.
__________________
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
Old 01-26-2013, 01:06 AM   PM User | #18
Old Pedant
Supreme Master coder!

 
Old Pedant's Avatar
 
Join Date: Feb 2009
Posts: 23,168
Thanks: 59
Thanked 3,993 Times in 3,962 Posts
Old Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to all
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.
Old Pedant is offline   Reply With Quote
Old 01-26-2013, 05:22 AM   PM User | #19
miranda
Senior Coder

 
Join Date: Dec 2002
Location: Arlington, Texas USA
Posts: 1,062
Thanks: 4
Thanked 8 Times in 8 Posts
miranda is an unknown quantity at this point
Quote:
Originally Posted by Old Pedant View Post
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
miranda is offline   Reply With Quote
Old 01-26-2013, 11:43 AM   PM User | #20
Airblader
Regular Coder

 
Join Date: Jan 2013
Location: Germany
Posts: 348
Thanks: 3
Thanked 43 Times in 43 Posts
Airblader can only hope to improve
Quote:
Originally Posted by Old Pedant View Post
Actually, Airblader, if you look at my post #2 I suggested that same basic answer way back on December 10th
Oh, my apologies. I even looked through the thread first but I must've missed that.

@miranda
Actually only one of those answers to your instructors' question was correct. My personal answer would've been

5 := {{}, {{}}, {{}, {{}}}, {{{}, {{}}, {{}, {{}}}}}, {{}, {{}}, {{}, {{}}}, {{{}, {{}}, {{}, {{}}}}}}}

and i really hope I didn't mess it up.
Airblader 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 12:34 PM.


Advertisement
Log in to turn off these ads.