|
-
Sep 16th, 2005, 03:41 AM
#1
Thread Starter
Frenzied Member
How can I put input type="password" in prompt?[Resolved]
I tried <input type="password" name="prompt"/> and it wont work.
I want the password I type in prompt will represent *.
TIA.
Last edited by mar_zim; Sep 16th, 2005 at 08:52 PM.
-
Sep 16th, 2005, 03:56 AM
#2
Re: How can I put input type="password" in prompt?
<input type="password" name="prompt"/>
What's the slash doing there?
-
Sep 16th, 2005, 04:06 AM
#3
Hyperactive Member
Re: How can I put input type="password" in prompt?
Closing the Tag!
Instead of doing
<input></input>
you can just write <input/>
Thats valid!
I tried this and it works for me :
HTML Code:
<HTML>
<HEAD>
<TITEL>Test</TITLE>
</HEAD>
<BODY>
<INPUT type="password" name="prompt" />
</BODY>
</HTML>
Keep Smiling - even if its hard 
Frankie Says Relax, wossname Says Yeah!
wossname:--Currently I'm wearing a gimp suit and a parachute.
C# - Base64 Blog
-
Sep 16th, 2005, 04:20 AM
#4
Thread Starter
Frenzied Member
Re: How can I put input type="password" in prompt?
Thanks sgt for replying.
I think I didn't make it clear.
What I want is when I type in prompt(inputbox in vb) it will filter the character to *.
Code:
HEAD>
<SCRIPT language="JavaScript">
<!--hide
var password;
<input type="password" name="prompt"??? />
password=prompt('Please enter your password to view this page!',' ');
if (password=="dead")
alert('Password Correct! Click OK to enter!');
else
{
alert('Your Dead');
}
//-->
</SCRIPT>
</HEAD>
-
Sep 16th, 2005, 04:49 AM
#5
Hyperactive Member
Re: How can I put input type="password" in prompt?
Ah Ok now I understand what you want to do! Open a JS Prompt that is supposed to act like an Inbox with type set to password.
I am sorry, I dont know of a way to do this!
Why dont you just create a form where a user can enter Username and Password. Looks better imho.
Sorry for not being more of a help here!
Stephan
Keep Smiling - even if its hard 
Frankie Says Relax, wossname Says Yeah!
wossname:--Currently I'm wearing a gimp suit and a parachute.
C# - Base64 Blog
-
Sep 16th, 2005, 05:19 AM
#6
Re: How can I put input type="password" in prompt?
You cannot do that. Simple.
-
Sep 16th, 2005, 08:00 PM
#7
Thread Starter
Frenzied Member
Re: How can I put input type="password" in prompt?
 Originally Posted by mendhak
You cannot do that. Simple.
So what are the other way of prompting an input box to ask password?
Im sorry for stupidity, I'm very new at this thing.
-
Sep 16th, 2005, 08:19 PM
#8
Re: How can I put input type="password" in prompt?
It's not possible. End of discussion. Make a page that prompts for a password (not in a popup). Submit the page to the server. If it's correct, show the real page.
Well, that's not entirely correct. It is possible by making the server emit a 401 - Authorization Required response. The typical way to do this is the .htaccess file in Apache. This will make the browser pop up a box asking for username and password.
But it's not possible using JavaScript.
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
-
Sep 16th, 2005, 08:51 PM
#9
Thread Starter
Frenzied Member
Re: How can I put input type="password" in prompt?
 Originally Posted by CornedBee
It's not possible. End of discussion. Make a page that prompts for a password (not in a popup). Submit the page to the server. If it's correct, show the real page.
Well, that's not entirely correct. It is possible by making the server emit a 401 - Authorization Required response. The typical way to do this is the .htaccess file in Apache. This will make the browser pop up a box asking for username and password.
But it's not possible using JavaScript.
Thanks for the good advice CornedBee. I think I just make a page that ask password and not pop up.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|