I've got a simple login form that just won't start with blank values, no matter what I do (even after adding JavaScript).  Code  &lt;form id="loginForm" name="loginForm" action="login.php" method="post"&gt;     &lt;div class="fields-search"&gt;         &lt;input type="text" id="wf_username" class="form-control" placeholder="Username" value="" name="wf_username" title="Required" required&gt;         &lt;script type="text/javascript"&gt;              document.getElementById("wf_username").value="";          &lt;/script&gt;         &lt;input type="password" id="wf_password" class="form-control" placeholder="Password" value="" name="wf_password" title="Required" required&gt;         &lt;script type="text/javascript"&gt;              document.getElementById("wf_password").value="";          &lt;/script&gt;         &lt;input type="submit" value="Login" id="formsubmit" class="btn btn-success"&gt;     &lt;/div&gt; &lt;/form&gt;   But it always shows this:   I don't know if that's my MAMP MySQL password showing, but it's disturbing. In every other form where I've used value="" it works fine - what gives here?  I have cleared my cache and tried Chrome &amp; FF - same behaviour. But Safari seems to work fine (Chrome &amp; FF work fine for my other forms where I've set value="", though)  Edit I added the autocomplete attribute to both inputs but same result.          &lt;form id="loginForm" name="loginForm" action="login.php" method="post"&gt;             &lt;div class="fields-search"&gt;                  &lt;input type="text" id="wf_username" class="form-control" placeholder="Username" value="" name="wf_username" title="Required" autocomplete="off" required&gt;                     &lt;script type="text/javascript"&gt;                          document.getElementById("wf_username").value="";                      &lt;/script&gt;                 &lt;input type="password" id="wf_password" class="form-control" placeholder="Password" value="" name="wf_password" title="Required" autocomplete="off" required&gt;                     &lt;script type="text/javascript"&gt;                          document.getElementById("wf_password").value="";                      &lt;/script&gt;                 &lt;input type="submit" value="Login" id="formsubmit" class="btn btn-success"&gt;             &lt;/div&gt;         &lt;/form&gt;   Edit 3 Autocomplete doesn't work when there is an input of type 'password'. Looks like Chrome &amp; FF will autofill that and then an adjacent text box with a username from its saved user/pswd info. This DID work:  &lt;form id="loginForm" name="loginForm" action="login.php" method="post"&gt;     &lt;div class="fields-search"&gt;          &lt;input type="text" id="wf_username" class="form-control" placeholder="Username" value="" name="wf_username" style="background:none" title="Required" autocomplete="off" readonly onfocus="if (this.hasAttribute('readonly')) {this.removeAttribute('readonly');                                 this.blur(); this.focus(); }" autofocus required&gt;         &lt;input type="password" id="wf_password" class="form-control" placeholder="Password" value="" name="wf_password" style="background:none" title="Required" autocomplete="off" readonly onfocus="if (this.hasAttribute('readonly')) {this.removeAttribute('readonly');                                 this.blur(); this.focus(); }"  required&gt;         &lt;div align="center"&gt;             &lt;input type="submit" value="Login" id="formsubmit" class="btn btn-danger"         &lt;/div&gt;     &lt;/div&gt; &lt;/form&gt;
4609
How do you disable autocomplete in the major browsers for a specific input (or form field)?
61930
I'm reloading a web page that has the following code:  &lt;label for="showimage"&gt;Show Image&lt;/label&gt; &lt;input id="showimage" name="showimage" type="checkbox" value="1" /&gt;   Even though the HTML stays sent to the browser is the same for each reload of the page, the checkbox always takes on the checked value when a reload was performed.  In other words, if the user checks the checkbox and reloads, the checkbox is still checked.  Is there some caching going on here?    Edit: I tried Gordon Bell's solution below and find that this is still happening even after removing the value="1".  Anything else I might be missing?  &lt;label for="showimage"&gt;Show Image&lt;/label&gt;  &lt;input id="showimage" name="showimage" type="checkbox" /&gt;
106850
When using the xhtml1-transitional.dtd doctype, collecting a credit card number with the following HTML  &lt;input type="text" id="cardNumber" name="cardNumber" autocomplete='off'/&gt;   will flag a warning on the W3C validator:     there is no attribute "autocomplete".   Is there a W3C / standards way to disable browser auto-complete on sensitive fields in a form?
70194
We have a custom javascript button on the quotes object in our org that has been working for several months that someone has noticed today is not working.    I'm not sure if there was an update that broke it or what day exactly it stopped working.  I'm hoping someone has an idea of where I can even begin to look.   Here's the code:   javascript:location.href= 'mailto:emailaddress@ourdomain.com?SUBJECT='+ escape("{!Quote.Name}")+' - '+ escape("{!Quote.Contact_s_Account__c}") + '&amp;BODY=Please convert ' + escape(location.href)+ ' into a proposal and send it to the email address on the quote.  Thanks!';   Using developer tools in chrome, I see this error after I click the javascript button:   presence: onFailure in event parser ={"status":-5,"statusText":""}page load happens value=true           umps1w4.salesforce.com/umps/UMPSWidget_184/js/dist/umps-min.js?cflag=184.36:14 presence: onFailure in event parser ={"status":-5,"statusText":""}page load happens value=true   I changed my code to something simple:   javascript:location.href= 'mailto:emailaddress@ourdomain.com?SUBJECT='hello'    and got this error in the developer tools in chrome:   Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience. For more help, check http://xhr.spec.whatwg.org/.   This lead me to the conclusion that I'm having XSS issues.  I do remember a SF update not too long about about protecting against XSS issues.  I guess I'll have to figure out a different way to implement this functionality.
103035
I remember seeing a way to have an &lt;input type="password" /&gt; such that the browser will not prompt the user to save the password. But I'm drawing a blank. Is there an HTML attribute or some JavaScript trick that will do this?
119247
I got a set of meta boxes on a custom post type. Two of them are simple input/text-type fields, that should have autocompleted input:   A) Another Custom Post Type B) Users   Now I have the problem that I need to somehow trigger the autocomplete event. So far I have this pretty simple definition:  jQuery( document ).ready( function ($)         {             $( '#some_id' ).autocomplete(             {                  minLength: 2                 ,source:    "&lt;?php print 'SOME_STRING'; ?&gt;"             } );         } );   which gives me the following answer in the console, when I enter "zz":      GET http:// localhost/wordpress/wp-admin/SOME_STRING?term=zz 404 (Not Found)   Point is that I need to run a query (as you can see above) and need to root the request for the source option/argument from autocomplete somehow to a php callback.  I hope someone can explain me how I'd get around this. Thanks (and merry christmas in case you read this :) !
91212
I am trying to create a form that will allow users to update their information on the front end.  I am just starting to learn PHP (I know C# very well).  If I use this code to create a form on a WordPress page, how do I get the information from the user when they press the 'Update' button and then update the database?  function Insert_AccountTable_1() {     $current_user = wp_get_current_user();      if ($current_user-&gt;ID != 0)     {         return &lt;&lt;&lt;HTML             &lt;form class="AlumniForm" method="post"&gt;             &lt;h3&gt;Name&lt;/h3&gt;             &lt;br&gt;             &lt;table&gt;                 &lt;tbody&gt;                     &lt;tr&gt;                         &lt;th&gt;&lt;label for="Username"&gt;Username&lt;/label&gt;&lt;/th&gt;                         &lt;td&gt;&lt;span&gt;$current_user-&gt;user_login&lt;/span&gt;&lt;/td&gt;                         &lt;td&gt;&lt;span class="description"&gt;Usernames cannot be changed.&lt;/span&gt;&lt;/td&gt;                     &lt;/tr&gt;                     &lt;tr&gt;                         &lt;th&gt;&lt;label for="current_user_firstname"&gt;First Name&lt;/label&gt;&lt;/th&gt;                         &lt;td&gt;&lt;input id="current_user_firstname" type="text" name="current_user_firstname" value="$current_user-&gt;user_firstname"/&gt;&lt;/td&gt;                     &lt;/tr&gt;                     &lt;tr&gt;                         &lt;th&gt;&lt;label for="current_user_lastname"&gt;Last Name&lt;/label&gt;&lt;/th&gt;                         &lt;td&gt;&lt;input id="current_user_lastname" name="current_user_lastname" type="text" value="$current_user-&gt;user_lastname"/&gt;&lt;/td&gt;                     &lt;/tr&gt;                     &lt;tr&gt;                         &lt;th&gt;&lt;label for="current_user_displayname"&gt;Display Name&lt;span class="description"&gt;(required)&lt;/span&gt;&lt;/label&gt;&lt;/th&gt;                         &lt;td&gt;&lt;input id="current_user_displayname" type="text" value="$current_user-&gt;display_name"/&gt;&lt;/td&gt;                     &lt;/tr&gt;                 &lt;/tbody&gt;             &lt;/table&gt;              &lt;h3&gt;Contact Info&lt;/h3&gt;             &lt;br&gt;             &lt;table&gt;                 &lt;tbody&gt;                     &lt;tr&gt;                         &lt;th&gt;&lt;label for="current_user_email"&gt;E-mail&lt;span class="description"&gt;(Required)&lt;/span&gt;&lt;/label&gt;&lt;/th&gt;                         &lt;td&gt;&lt;input id="current_user_email" type="text" value="$current_user-&gt;user_email"/&gt;&lt;/td&gt;                     &lt;/tr&gt;                     &lt;tr&gt;                         &lt;th&gt;&lt;label for="current_user_url"&gt;Website&lt;/label&gt;&lt;/th&gt;                         &lt;td&gt;&lt;input id="current_user_email" type="text" value="$current_user-&gt;user_url"/&gt;&lt;/td&gt;                     &lt;/tr&gt;                 &lt;/tbody&gt;             &lt;/table&gt;             &lt;input type="submit" name="current_user_submitupdates"&gt;Update&lt;/input&gt;             &lt;/form&gt; HTML;     }     else     {         return &lt;&lt;&lt;HTML         &lt;h3&gt;Error - User not logged in&lt;/h3&gt; HTML;     } }  add_shortcode('InsertAccountTableI', 'Insert_AccountTable_1');
7467
I quote to this  at Mozilla.org  Turn autofill on or off   Click the menu button Menu and choose Preferences. Click the Privacy &amp; Security panel. In the Forms &amp; Passwords section, put a check mark next to Autofill addresses to turn it on, or remove the check mark to turn it off.   I have a Privacy &amp; Security panel but no Forms &amp; Passwords section nor an Autofill option.  This is an updated version of Firefox on an updated version of MacOS.  Where are these options? Searching for them using the preferences search returns nothing.
52829
I visited a question  and happened to get the newsletter registration prompt, which appears to have a styling issue in the email field:    The quick fix would be for the two fields to just have the same width (149px vs 200px), but it probably also makes sense at this point to just do away with the pseudo placeholders and just use the placeholder attribute universally, with a polyfill for legacy browsers.
30708
This is my first time here but I have already posted this question on SO. I keep getting solutions for Windows + Java and not for Linux or python for that matter.  I am using Selenium and Python to automate a file upload application for the past many hours but nothing helpful!   The HTML DOM structure for this file upload is an input tag with its type attribute value = 'file'. I know I can make use of the send_keys.   The problem is I am not supposed to use send_keys() (as per the question I am trying to solve). The assumption is there are other ways of doing it.  Can anyone suggest me alternative ways to upload the file? I do get solutions for windows but not for Linux(Ubuntu). I know there are applications/tools to automate GUI components like AutoIt but there is nothing for Linux close to AutoIt.  I can say I have done my homework to find a solution. Only after not finding anything useful, I am asking this question, please help!
39303
I have a working login form in an asp.net application.  Standard stuff with a username and password text box and a button to process the login.  Works fine.  I have a new requirement to allow the user to input the username and password from a separate plain html page that is not a part of my asp.net application.  I plan on achieving this using standard html - form, input, submit button etc.  The form action will be the URL of my asp.net login page and its method will be POST.    What I want to do in the C# code behind page of the asp.net login form, presumably in the Page_Load event, is to check if the request for the page contains a username and password value being passed in.  If it does then I need to read those values and process the login as if someone had clicked the login button on the asp.net page.  If not then I will display the login form as usual.    How do I check for the existence of, and read, the username and password values in the request for my page.
91273
My users would like to be able to hit Ctrl+S to save a form.  Is there a good cross-browser way of capturing the Ctrl+S key combination and submit my form?  App is built on Drupal, so jQuery is available.
4341
My web application has a login page that submits authentication credentials via an AJAX call. If the user enters the correct username and password, everything is fine, but if not, the following happens:   The web server determines that although the request included a well-formed Authorization header, the credentials in the header do not successfully authenticate. The web server returns a 401 status code and includes one or more WWW-Authenticate headers listing the supported authentication types. The browser detects that the response to my call on the XMLHttpRequest object is a 401 and the response includes WWW-Authenticate headers. It then pops up an authentication dialog asking, again, for the username and password.   This is all fine up until step 3. I don't want the dialog to pop up, I want want to handle the 401 response in my AJAX callback function. (For example, by displaying an error message on the login page.) I want the user to re-enter their username and password, of course, but I want them to see my friendly, reassuring login form, not the browser's ugly, default authentication dialog.  Incidentally, I have no control over the server, so having it return a custom status code (i.e., something other than a 401) is not an option.  Is there any way I can suppress the authentication dialog? In particular, can I suppress the Authentication Required dialog in Firefox 2 or later? Is there any way to suppress the Connect to [host] dialog in IE 6 and later?    Edit Additional information from the author (Sept. 18): I should add that the real problem with the browser's authentication dialog popping up is that it give insufficient information to the user.  The user has just entered a username and password via the form on the login page, he believes he has typed them both correctly, and he has clicked the submit button or hit enter. His expectation is that he will be taken to the next page or perhaps told that he has entered his information incorrectly and should try again. However, he is instead presented with an unexpected dialog box.  The dialog makes no acknowledgment of the fact he just did enter a username and password. It does not clearly state that there was a problem and that he should try again. Instead, the dialog box presents the user with cryptic information like "The site says: '[realm]'." Where [realm] is a short realm name that only a programmer could love.  Web broswer designers take note: no one would ask how to suppress the authentication dialog if the dialog itself were simply more user-friendly. The entire reason that I am doing a login form is that our product management team rightly considers the browsers' authentication dialogs to be awful.
96382
When I input [asdf][lisp] into the search field on , without being logged in, only one tag remains. Is it broken?
81188
Just wondering if there is anything built-in to Javascript that can take a Form and return the query parameters, eg: "var1=value&amp;var2=value2&amp;arr[]=foo&amp;arr[]=bar..."  I've been wondering this for years.
8189
I have a WordPress website that I recently discovered had this error on the login page:     ERROR: Cookies are blocked due to unexpected output. For help, please   see this documentation or try the support forums.   I can only access the login page from wp-login.php, since /wp-admin/ displays a blank white page.  I've searched the web and tried many things with no success:   Removing ?&gt; and space at end of the functions.php Ensuring both functions.php and wp-config.php had no spaces at beginning or end of file Opening wp-config.php and functions.php in Notepad++ and converting to UTF-8 (people recommend 'without BOM' but that is only an option in the newest version of Notepad++ - I'm guessing UTF-8 does that now) I've set WP_DEBUG to true and have received no errors in debug.log,  except for 2 that relate to when I hadn't fully uploaded some files. That particular error mentioned nav-menu.php; this confirmed that it is reporting errors, just not related to my login issues I renamed each plugin folder with _tmp at the end to try and rule out any plugins causing the problem I also renamed the plugins folder to rule out all plugins at the same time   Given these things I've tried, and that I'm not receiving any PHP errors, what else could I try?
73078
Can someone please tell me how to submit an HTML form when the return key is pressed and if there are no buttons in the form? The submit button is not there. I am using a custom div instead of that.