?
Solved

javascript blues

Posted on 1997-09-01
2
Medium Priority
?
199 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 

Expert Comment

by:lasse012397
ID: 1854915
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 200 total points
ID: 1854916
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

Get MySQL database support online, now!

At Percona’s web store you can order your MySQL database support needs in minutes. No hassles, no fuss, just pick and click. Pay online with a credit card.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Because your company can’t afford for you to make SEO mistakes, you’ll want to ensure you’re taking the right steps each and every time you post a new piece of content. This list of optimization do’s and don’ts can help you become an SEO wizard.
When the s#!t hits the fan, you don’t have time to look up who’s on call, draft emails, call collaborators, or send text messages. An instant chat window is definitely the way to go, especially one like HipChat. HipChat is a true business app. An…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
Suggested Courses

762 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