Note that there are some explanatory texts on larger screens.

plurals
  1. POplaceholder does not work for password field
    primarykey
    data
    text
    <p>I have used placeholder for password field. input type for password field is "text" when I enter my password it does not work properly.</p> <p>When I enter my password then my first character of password is not entered properly something like keypress is not working for the first time.</p> <p>Please click below link</p> <p><a href="http://www.techmodi.com/demo/firstjitters/" rel="nofollow">http://www.techmodi.com/demo/firstjitters/</a></p> <p>click on login button it open a popup window where I have used placeholder password field.</p> <p>Code :</p> <pre><code> &lt;input name="password" id="password" type="text" class="input" tabindex="2" placeholder="Password" /&gt; </code></pre> <p>js file :</p> <pre><code>window.onload = function() { var arrInputs = document.getElementsByTagName("input"); for (var i = 0; i &lt; arrInputs.length; i++) { var curInput = arrInputs[i]; if (!curInput.type || curInput.type == "" || curInput.type == "text" || curInput.type == "password") HandlePlaceholder(curInput); } }; function HandlePlaceholder(oTextbox) { //alert(typeof oTextbox.placeholder); if (typeof oTextbox.placeholder == 'string') { var curPlaceholder = oTextbox.getAttribute("placeholder"); if (curPlaceholder &amp;&amp; curPlaceholder.length &gt; 0) { oTextbox.value = curPlaceholder; oTextbox.setAttribute("old_color", oTextbox.style.color); oTextbox.style.color = "#c0c0c0"; oTextbox.onfocus = function() { this.style.color = this.getAttribute("old_color"); if (this.value === curPlaceholder) this.value = ""; }; oTextbox.onblur = function() { if (this.value === "") { this.style.color = "#c0c0c0"; this.value = curPlaceholder; } }; } } } </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload