Link to home
Start Free TrialLog in
Avatar of MortenWB
MortenWBFlag for Denmark

asked on

unwanted autofill in username and password form input fields v2

Hi Experts,

I thought this issue was solved, but the problem persists.

I am writing some ASP code for a simple HTML-form with wich to insert a record with database entries for a new user of a resource reservation system.

I create the neccesary fields for surname, lastname, position, student number, notes and so on and then fields for username and password.

I then proceed to test the form and so log on to the reservation system with administrative rights using my own username and password - wich I have asked all the testbrowsers (IE7, Firefox, Chrome, Safari) to remember.

On the main page I call the NewUser form as a popup, sending my own username and password to the new page via onClick="window.open..." method.

Now for som reason my own username and password automatically fill the corresponding input fields???

I gave the input fields unique names and  id's with no success. And on deleting them my username just pops up in another field...

Does anyone have any idea of what is happening?

Best regards
Morten B

Here comes the code:

<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
 
 
<!-- #include file="McalJavascripts.asp" -->
<link href="CSS/Calendar.css" rel="stylesheet" type="text/css" />
 
 
<title>Opret Bruger</title>
 
<%
dim adminid
dim adminname
 
adminid = request("adminid")
adminname = request("adminname")
 
%>
</head>
 
<body bgcolor="#EEEEEE">
 
<div align="center">
<div style="background-color:#99CCCC">
    <h3><b>Opret ny bruger</b></h3>
        
</div>    
    <table width="151px" cellspacing="0px" cellpadding="1px" bgcolor="#BBBBBB" class="dateinput1">
			<form action="MCalUserUpdate.asp" name="thisform" id="thisform" onsubmit="return validate_form(this);" method="get" >
 
            <tr align="left"><td align="right">Fornavn</td><td><input id="surname" type="text" name="surname" class="dateinput2" style="width:100px; text-align:left"/></td></tr>
            <tr align="left"><td align="right">Efternavn</td><td><input id="lastname" type="text" name="lastname" class="dateinput2" style="width:100px; text-align:left"/></td></tr>
            <tr align="left"><td align="right">Stilling</td><td><input id="pos" type="text" name="pos" class="dateinput2" style="width:100px;text-align:left"/></td></tr>
            <tr align="left"><td align="right">Evt. studnr.</td><td><input id="Studnr" type="text" name="Studnr" class="dateinput2" style="width:50px; text-align:left "/></td></tr>
            
            <tr align="left"><td align="right">Brugernavn</td><td><input type="text" id="Newusername" name="Newusername" class="dateinput2" style="width:100px; text-align:left"/></td></tr>
            <tr align="left"><td align="right">Password</td><td><input type="password" id="Newpassword1" name="Newpassword1" class="dateinput2" style="width:100px; text-align:left" /></td></tr>
            <tr align="left"><td align="right">Gentag&nbsp;password</td><td><input type="password" id="Newpassword2" name="Newpassword2" class="dateinput2" style="width:100px; text-align:left" /></td></tr>
            
            
            <tr align="left"><td align="right">Notat</td><td><textarea class="dateinput2" name="notepad" style="width:100px; text-align:left"></textarea></td></tr>
            <tr align="left"><td align="right">Adgangsniveau</td><td>
					<select id="userlevel" name="userlevel" class="dateinput2" style="width:100px; text-align:left" >
						<%
						dim x, level
                        for x = 1 to 3
						if x = 1 then level = "administrator"
						if x = 2 then level = "priviligeret"
						if x = 3 then level = "gæst"
                        %>
					<option value="<%=x%>" style="text-align:left" >
						<%=x & " - " & level%>
					</option>
						<%next%>
                    </select>
            
            <tr align="left"><td align="center" colspan="2"><br /><input type="submit" value="Opret bruger" class="flatbutton1" onMouseOver="this.style.cursor='pointer';" /></td></tr>
            <input type="hidden" name="adminid" value="<%=adminid%>"/>
            <input type="hidden" name="adminname" value="<%=adminname%>"/>
            <input type="hidden" name="created" value="<%=date()%>"/>
            </form>
	</table>
</div>
</body>
</html>

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of abel
abel
Flag of Netherlands image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of MortenWB

ASKER

abel,

thanks for getting back to me.

No, I didn't know that attribute - I tried it, and it worked on the input text field but not on the password field?

That might be a minor problem of course, as the password field only display dots. But now I'm really curious as to the cause of this issue.

MortenWB
I don't know why it does not work for the password. You can try setting the value="", not sure if that will help.

The problem with these autocomplete features and local testing is, that you end up having many different forms that are almost the same (from a browser point of view) and sometimes the url changes (when you change some request properties) etc etc. In other words, having autocomplete in your browser set to on when on a development machine, will very likely yield unexpected results.

But don't worry too much about it. Users of your web pages do not use the browser the way you do and only visit your forms for regular visits. for them, the autocomplete feature will work largely normal.
abel,

good response, I'll work with autocomplete off when continuing tomorrow and get back to you after a few more tests and let you know of my results.

Have to turn in for now, so have patience with me for some hours.


Hi again,

This time I checked thoroughly, and the autocomplete=Off simply works on client computers.

Thanks for helping me out

Best regards

Morten WB
You're welcome, glad it helped

-- Abel --