By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,946 Members | 1,701 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,946 IT Pros & Developers. It's quick & easy.

Login dialog box?

P: n/a
I was wondering how you create a standard login dialog box that is
commonly used before you can enter some sites. It asks for a user name
and password and usually it will have a checkbox asking if the user
wants to save the password in the password list. It is very common
and I am pretty sure everyone knows what I am talking about. I have
been searching through the news groups and I have yet to find anything
that is helpful. I am assuming this can be solved in javascript, but
if there are any another ways to do it I would appreciate that as
well. Thanks very much in advance.
Jul 20 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a
Antonio Delgado wrote:
I was wondering how you create a standard login dialog box that is
commonly used before you can enter some sites. It asks for a user name
and password and usually it will have a checkbox asking if the user
wants to save the password in the password list.


<form action="..." ...>
User&nbsp;name: <input name="username"><br>
Password: <input type="password" name="password"><br>
<input type="submit">
</form>

What you are experiencing by the dialog box that is displayed on submit is
a built-in browser feature (I know of it in IE as AutoComplete and as Form
Manager's Auto-Fill-in in Mozilla/5.0,) not something triggered with
JavaScript code.
PointedEars

Jul 20 '05 #2

P: n/a
VK
You must be talking about the Basic Authentication protocol. Any good
browser indeed has a built-in interface to handle this protocol, and a
really good one also provides a way to store password/login locally (if
you want to). The Basic Authentication protocol is initiated by server.
You can mimic it appearance/behavior by using JavaScript, but you cannot
recreate the provided security level.

If you are hosting your site on Apach-driven server (a very good chance
that you are), read
http://www.webdevelopersjournal.com/.../htpasswd.html

It's not so difficult at all.

Jul 20 '05 #3

P: n/a
I am making a web interface that will allow users to interact with a
system through a web browser. And of course must have a user name and a
password to log into the system. I want to have a login dialog box to
get the user's name and password as opposed to a login page. As far as
saving the password with the AutoComplete...I am not worried about
that...I just mentioned that to help describe what the dialog box looks
like. It is pretty common and it looks like any other alert or prompt. I
don't think that it is just HTML because it has the look and behavior of
a dialog box. And it pops up when someone enters a site but before any
web page is opened. I hope this makes sense and that it helps clarify me
earlier post. If not let me know and I will get back to you. And once
again thanks.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 20 '05 #4

P: n/a
Antonio Delgado wrote:
I want to have a login dialog box to get the user's name and password as
opposed to a login page.


You mean HTTP (Basic) Authentication which is not done with JavaScript, too:

http://httpd.apache.org/docs-2.0/howto/auth.html
PointedEars

Jul 20 '05 #5

P: n/a
VK wrote:
You must be talking about the Basic Authentication protocol. Any good
browser indeed has a built-in interface to handle this protocol,


(Basic) Authentication is a feature of HTTP, the HyperText Transfer Protocol
(versions 1.0 and above), not a separate protocol. Thus any HTTP user agent,
including web browsers, is required to support it:

http://www.cis.ohio-state.edu/cgi-bi...45.html#sec-11
http://www.w3.org/Protocols/rfc2616/...c11.html#sec11
PointedEars

Jul 20 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.