Solved

javascript blues

Posted on 1997-09-01
2
198 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 100 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

Learn by Doing. Anytime. Anywhere.

Do you like to learn by doing?
Our labs and exercises give you the chance to do just that: Learn by performing actions on real environments.

Hands-on, scenario-based labs give you experience on real environments provided by us so you don't have to worry about breaking anything.

Question has a verified solution.

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

When it comes to write a Context Sensitive Help (an online help that is obtained from a specific point in state of software to provide help with that state) ,  first we need to make the file that contains all topics, which are given exclusive IDs. …
Learn by example how to specify CSS selectors for Selenium WebDriver test automation software.
This tutorial walks through the best practices in adding a local business to Google Maps including how to properly search for duplicates, marker placement, and inputing business details. Login to your Google Account, then search for "Google Mapmaker…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

695 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