View Full Version : Is the verity function possible with JS

02-01-2011, 04:53 PM

I wan't to create a verity function like here, when you've forgot your password and need to send a new one the email ie. a random question, and if you got it right will you turn to page1.htm and if wrong you'll return to page2.htm. We could also call it a random question displayer.

So I wan't to know if it's possible, before I start creating one. :)

Philip M
02-01-2011, 07:28 PM
No. What you want cannot be done with Javascript. JavaScript is purely a client-side language, and unless used with an Ajax call has no capability to read from or write to a file (except a cookie), communicate with the server, access a database, the client's operating system or the Windows registry, or alter the default behaviour of the browser.

I am afraid that I do not see how this relates to displaying a random question. That is easily done with Javascript. But the security factor is virtualy zero as anyone can read the correct answer to the question with View Source (although it is possible to obfuscate that and make it harder to see). And of course the URLs are viewable as well.

Quizmaster: La Stampa and La Repubblica are newspapers published in which European country?
Contestant: Mexico

02-01-2011, 07:44 PM
Okay thanks for the answer.