Forums

This topic is locked

Different approach to a login system

Posted 18 Oct 2003 00:23:07
1
has voted
18 Oct 2003 00:23:07 Dave Thomas posted:
Lo all

I'm looking to create a login system using a numbered keypad instead of the standard Username/Password boxes.

Trying to figure out the best way to go about it.

I've currently got it set up as a keypad
using 10 buttons (image fields) to act as the numbers.

so basically building the form was simple, it's catching the numbers into the textbox below (the password field)
thats got me a little confused.

the form needs to send info from the button value into the same form on thes ame page, and then not overwrite itself when the second button is pressed. Hmmmmm

any pointers would be greatly appreciated.


Regards,
Dave

UD4 | Flash 5/MX | Studio MX | SQL | Access | ASP/VBScript | XP-Pro

Replies

Replied 18 Oct 2003 07:43:17
18 Oct 2003 07:43:17 Dave Clarke replied:
One way to do it would to create duplicate pages for however many numbers are in the login/password and have the first page submit to the second and on this page have a hidden field set to the number passed from the first page, then the second page passes the new number and the hidden field number to another hidden field on the third page and so on and so on, then the last page submits the whole thing to be checked against your database.
Long winded i know but its all i can think of off the top of my head.

Dave

ASP|VBScript|IIS5.1|Access|WinXPPro & WinXPHome
Replied 18 Oct 2003 21:00:12
18 Oct 2003 21:00:12 Dave Thomas replied:
I got a reply on another forum stating that this can only be done using Javascript.

Any good javascripters willin to help? I suck at it tbh <img src=../images/dmxzone/forum/icon_smile_sad.gif border=0 align=middle>

Regards,
Dave

UD4 | Flash 5/MX | Studio MX | SQL | Access | ASP/VBScript | XP-Pro
Replied 20 Oct 2003 22:08:16
20 Oct 2003 22:08:16 Dave Thomas replied:
ok, gonna take a look at some code for a calculator, as that is basically what i need.

It's got numbers and it passes them to a textbox before calculating a sum, so i hope it gives me some inspiration.



Regards,
Dave

UD4 | Flash 5/MX | Studio MX | SQL | Access | ASP/VBScript | XP-Pro
Replied 15 Nov 2003 12:55:25
15 Nov 2003 12:55:25 Dave Thomas replied:
Because these buttons will do nothing for the 13% of users who do not use JavaScript you will want to draw them with JavaScript. but heres how you do it anyway. thx to a guy called Charles who answered me in about 5 seconds.

&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"www.w3.org/TR/html4/strict.dtd"&gt;
&lt;meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"&gt;
&lt;meta name="Content-Script-Type" content="text/javascript"&gt;
&lt;title&gt;Example&lt;/title&gt;

&lt;style type="text/css"&gt;
&lt;!--
label {display:block}
input {display:block}
button {margin:1ex}
button.key {width:2em}
--&gt;
&lt;/style&gt;

&lt;form action=""&gt;
&lt;div&gt;
&lt;label&gt;Password&lt;input type="text" id="password"&gt;&lt;/label&gt;
&lt;script type="text/javascript"&gt;
&lt;!--
document.getElementById('password').disabled = true;
document.write('&lt;div&gt;')
document.write('&lt;button class="key" onclick="this.form.password.value += this.value"&gt;7&lt;/button&gt;')
document.write('&lt;button class="key" onclick="this.form.password.value += this.value"&gt;8&lt;/button&gt;')
document.write('&lt;button class="key" onclick="this.form.password.value += this.value"&gt;9&lt;/button&gt;')
document.write('&lt;/div&gt;')
document.write('&lt;div&gt;')
document.write('&lt;button class="key" onclick="this.form.password.value += this.value"&gt;4&lt;/button&gt;')
document.write('&lt;button class="key" onclick="this.form.password.value += this.value"&gt;5&lt;/button&gt;')
document.write('&lt;button class="key" onclick="this.form.password.value += this.value"&gt;6&lt;/button&gt;')
document.write('&lt;/div&gt;')
document.write('&lt;div&gt;')
document.write('&lt;button class="key" onclick="this.form.password.value += this.value"&gt;1&lt;/button&gt;')
document.write('&lt;button class="key" onclick="this.form.password.value += this.value"&gt;2&lt;/button&gt;')
document.write('&lt;button class="key" onclick="this.form.password.value += this.value"&gt;3&lt;/button&gt;')
document.write('&lt;/div&gt;')
document.write('&lt;div&gt;')
document.write('&lt;button class="key" onclick="this.form.password.value += this.value" style="margin-left:6.5ex"&gt;0&lt;/button&gt;')
document.write('&lt;/div&gt;')
// --&gt;
&lt;/script&gt;
&lt;button type="submit"&gt;Log on&lt;/button&gt;
&lt;button type="reset"&gt;Clear&lt;/button&gt;
&lt;/div&gt;
&lt;/form&gt;

Regards,
Dave

UD4 | Flash 5/MX | Studio MX | SQL | Access | ASP/VBScript | XP-Pro

Reply to this topic