unwanted autofill in username and password form input fields v2

Posted on 2009-04-21
Medium Priority
Last Modified: 2012-05-06
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:

<!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">
<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")
<body bgcolor="#EEEEEE">
<div align="center">
<div style="background-color:#99CCCC">
    <h3><b>Opret ny bruger</b></h3>
    <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%>
            <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()%>"/>

Open in new window

Question by:MortenWB
  • 3
  • 3
LVL 39

Accepted Solution

abel earned 1000 total points
ID: 24195437
Have you already considered trying the following attribute on the offended input boxes?



Author Comment

ID: 24196653

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.

LVL 39

Expert Comment

ID: 24198702
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.
Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.


Author Comment

ID: 24199093

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.


Author Comment

ID: 24202394
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
LVL 39

Expert Comment

ID: 24202513
You're welcome, glad it helped

-- Abel --

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

I was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
This demonstration started out as a follow up to some recently posted questions on the subject of logging in: http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28634665.html and http://www.experts-exchange.com/Programming…
If you are looking for an automated solution for backup single or multiple Office 365 user mailboxes to Outlook data file, then you can use Kernel Office 365 Backup & Restore tool. Go through the video to check out the steps to backup single or mult…
Watch the video to know the simple way to remove or recover or reset lost or forgotten passwords of Outlook PST file. With Kernel Outlook Password Recovery tool such operation is very easy to perform. It is a freeware with limitation to use with 500…

607 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question