Jump to content

Basic HTML Pop-Up


5614

Recommended Posts

a "pop-up" box would have a few click buttons, normaly 'yes' 'no' or 'cancel' or something like that.

 

a javascripts prompt could take a user input and therefore you could do something similar to what you are describing in a javascript prompt.

Link to comment
Share on other sites

<B>Group name or username:</B> <INPUT size=10 name=user MAXSIZE="10"> 
 <P><B>Password:</B> <INPUT type=password size=10 name=pass MAXSIZE="10"> 
 <P><INPUT type=submit value=Submit> <INPUT type=reset value=Clear>

Link to comment
Share on other sites

but that's not the whole thing, thats a username/password box on a webpage

 

you wanted a "pop-up" aka javascript prompt box and also there's no set username/password, i was wondering for the full source, incl. prompt box + either linking in to a password file or a password itself.... i mean, just replace the real password directory with a fake one, i'll change it.

 

im interesed as ive never done anything more than the most simple password in HTML, and thats visible in the source code! so i wanted more info... show me how, i'll understand it.

Link to comment
Share on other sites

this might work

 
<SCRIPT language="JavaScript">
<!--------

var password;

var pass1="cool";
var pass2="awesome";
var pass3="geekazoid";

password=prompt('Please enter your password to view this page!',' ');

if (password==pass1 || password==pass2 || password==pass3)
 alert('Password Correct! Click OK to enter!');
else
  {
   window.location="jpass.htm";
   }

//----------->
</SCRIPT>

Link to comment
Share on other sites

a "pop-up" box would have a few click buttons, normaly 'yes' 'no' or 'cancel' or something like that.

That's called a confirmation dialogue. Just couldn't think of the name earlier.

 

 

its on a cjb.net page and they don't allow server-side scripts

Use a .htaccess file.

Link to comment
Share on other sites

<SCRIPT language="JavaScript">
<!--------

var password;

var pass1="cool";
var pass2="awesome";
var pass3="geekazoid";

password=prompt('Please enter your password to view this page!',' ');

if (password==pass1 || password==pass2 || password==pass3)
 alert('Password Correct! Click OK to enter!');
else
  {
   window.location="jpass.htm";
   }

//----------->
</SCRIPT>

 

this does work... that's quite cool, it'll do for my exeriments for now, thanks!

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.