unwanted autofill in username and password form input fields v2

Posted on 2009-04-21
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="" 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" "">

<html xmlns="">


<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="'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
    LVL 39

    Accepted Solution

    Have you already considered trying the following attribute on the offended input boxes?



    Author Comment


    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

    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.

    Author Comment


    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

    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

    You're welcome, glad it helped

    -- Abel --

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Find Ransomware Secrets With All-Source Analysis

    Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

    I recently decide that I needed a way to make my pages scream on the net.   While searching around how I can accomplish this I stumbled across a great article that stated "minimize the server requests." I got to thinking, hey, I use more than one…
    I have helped a lot of people on EE with their coding sources and have enjoyed near about every minute of it. Sometimes it can get a little tedious but it is always a challenge and the one thing that I always say is:  The Exchange of information …
    In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
    This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor ( If you're looking for how to monitor bandwidth using netflow or packet s…

    779 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

    Need Help in Real-Time?

    Connect with top rated Experts

    10 Experts available now in Live!

    Get 1:1 Help Now