Note that there are some explanatory texts on larger screens.

plurals
  1. PO.show() .hide() not working in FIREFOX, working in IE
    text
    copied!<p>I am using 2 input fields, the first is the true one, the other will be hidden, just right behind it, using <code>position:fixed;</code> , when the user submits the form, there will be a Form Validation, if that original field is empty, the invisible input will show up, with a red background, with an alert message. this is working, by using <code>.show()</code> after it has had <code>display:none;</code> then I wrote another code in jquery, which makes this alert input go away, when the user clicks at it, means he's trying to access back the original input so he can write in it, and this is working, by using <code>.hide()</code> ; the problem is, when I click submit again, the alert input isn't showing up...again, in firefox; but it's working completely good in IE.</p> <p>Here is the HTML CODE:</p> <pre><code> &lt;div style=" padding-top:2px; overflow:hidden; float:left "&gt; &lt;div style="float:left; "&gt; &lt;label for="email"&gt; E-mail &lt;/label&gt; &lt;br&gt; &lt;div style="position:relative;"&gt; &lt;input class="inputtext" type="text" id="email" name="email" maxlength="32" style=" width:140px; height:15px;" tabindex=1/&gt; &lt;input class="inputtext" type="text" id="emailnotification" name="emailnotification" maxlength="32" style=" width:140px; background-color: rgb(220, 20, 60); color: white; z-index:20; display:none; height:15px; font-weight: bold; position:absolute; left:0px;"/&gt; &lt;/div&gt; &lt;/div&gt; </code></pre> <p>Now this is a part of the form validation function:</p> <pre><code>function validateForm() { var xe; var reg = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/; var xemail=document.forms["signinForm"]["email"].value; if(xemail==null || xemail=="") {$("#emailnotification").val("Email is Required"); $("#emailnotification").show(); xe=1; } else if (reg.test(xemail)==false) { $("#emailnotification").val("Email is not Valid"); $("#emailnotification").show(); xe=1; } </code></pre> <p>now this is the jquery code which hide it back:</p> <pre><code> $("#emailnotification").click ( function() { $("#emailnotification").hide(); $("#email").focus(); $("#emailnotification").blur(); }); </code></pre>
 

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