Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

javascript blues

Posted on 1997-09-01
2
Medium Priority
?
201 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Color can increase conversions, create feelings of warmth or even incite people to get behind a cause. If you want your website to really impact site visitors, then it is vital to consider the impact color has on them.
When crafting your “Why Us” page, there are a plethora of pitfalls to avoid. Follow these five tips, and you’ll be well on your way to creating an effective page.
Viewers will get an overview of the benefits and risks of using Bitcoin to accept payments. What Bitcoin is: Legality: Risks: Benefits: Which businesses are best suited?: Other things you should know: How to get started:
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

618 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