Solved

javascript blues

Posted on 1997-09-01
2
192 Views
Last Modified: 2013-12-25
my question is a mulitiple one.

       I have a page at http://www.GoldoffDesigns.com/frontdoor.html on this page "frontdoor.html", i have made a password button before you can go to the next page with a simple submit button and try again button. Their's also a ketch, the key is to answer the riddle to enter the next page. My problem is I, want to know how to give out text messages when the persons get the answer wrong and when the persons gets it right. And i know you can do that with java script but i don't know how to go about it. Also when they click on the selected buttons, i want nioses to go off. One other thing is very important to my fun page. Is that i want also to give the person a time limit in trying to solve the riddle. if the person can't figure it out then the page automatically moves to another page with out them knowing. And last but not least they only get three tries then the they get zapped out to another page or something like that.
If anyone has any idea of what i'm talking about or would like to give me some of their ideas, that would be great. To get a better idea of what i'm talking about please feel free to email me anytime, i never sleep....
@ zonelove@earthlink.net
              thank you ..
              David Goldoff
0
Comment
Question by:freez
2 Comments
 

Expert Comment

by:lasse012397
Comment Utility
I would create a Perl script.
With cookies you could even prevent the user from earning additionat trials by reloading the page!
Textmessages can be delivered by the java function "alert". Use this sytax in javascripts:
if (conition) {
       alert("Text message");
               }

0
 
LVL 2

Accepted Solution

by:
theTerabyte earned 100 total points
Comment Utility
Lasse is for the most part right.  it would be easier, but slower and harder at the same time to use PERL

if you ues perl, you have to use POST method so your SECRET PASSWORD isn't in the URL.  then all they have to do is use a bookmark to get past it.

also, if you use POST method with PERL you need to then dewebify it, as i like top say.

in JavaScript, though more difficult, it will be more secure and faster.  the only problem is that by selecting "view source" anyone can see the password!!!!

to fix that include the javascript in a separate file like secret.js, then they'd have to get it.  just one more thing they'd have to do.  basically, anyone could get by anything if they're determined enough!  they still could download the secret.js file, but if they're really that determined, they'll get in anyway.

so, you can use a cookie with JS to keep track of tries even if they reload, using this:

document.cookie = 'cookiename=mycookie; expires=(one day after today[must be in GMT form]); path="/"; domain=".GoldoffDesignes.com"; secure';

the best part is this way they can't try again today, but can come back tomarrow, or a week later(depending on what you set the expire for)  and try again.

also, use the alert("text here") to send text messages or
confirm("text here") to give text with ok or cancel buttons(returns true for ok and false for cancel)

like this:

if (confirm("are you sure you want to enter?")==false) {
history.back;
} else {
alert("alrighty, here you go!!!!!!!!!1");
}

any other questions leave a comment!
0

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Envision that you are chipping away at another e-business site with a team of pundit developers and designers. Everything seems, by all accounts, to be going easily.
Boost your ability to deliver ambitious and competitive web apps by choosing the right JavaScript framework to best suit your project’s needs.
This tutorial demonstrates how to identify and create boundary or building outlines in Google Maps. In this example, I outline the boundaries of an enclosed skatepark within a community park.  Login to your Google Account, then  Google for "Google M…
The viewer will learn how to dynamically set the form action using jQuery.

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now