Note that there are some explanatory texts on larger screens.

plurals
  1. POclicking on a div is not submitting form in Chrome on localhost
    primarykey
    data
    text
    <p>I think I have found an interesting problem (at least to me). I have a form that uses a click on a div inside the form to submit. I have used "document.forms.form.submit()" to make the div clickable to submit as suggested here <a href="https://stackoverflow.com/questions/8382184/this-form-submit-not-working-after-clicking-div-element-in-form">this.form.submit() not working after clicking div element in form</a> (thanks David Hedlund!)</p> <p>However the form was working fine in chrome, ff. But for some unknown reason, running the form in localhost on chrome is not working now. ff is working fine. What makes the problem interesting is when I uploaded the form to a web-server it works in chrome! Any Idea why this is happening in local machine? I am using Xampp. </p> <p>Here is the form-</p> <pre><code>&lt;form name="form" action="login_process.php" method="POST"&gt; &lt;div&gt; Username: &lt;input style="width:100px;" name="login_client[]" type="text" /&gt; Password: &lt;input style="width:100px;" name="login_client[]" type="password" /&gt; &lt;/div&gt; &lt;div align="right" class="whitearial12" style="position:absolute; font-size:10px; width:360px; height:17px; right:110px; top:35px;"&gt; Forgotten your &lt;a href="#"&gt;password&lt;/a&gt;, or need to &lt;a href="#"&gt;register&lt;/a&gt;? &lt;/div&gt; &lt;!-- this is the div !--&gt; &lt;div onClick="document.forms.form.submit()" align="center" class="whitearial12" style="cursor: pointer; position:absolute; padding-top:3px; padding-bottom:-3px; width:80px; height:17px; right:20px; top:10px; background-image: url(Images/button_blank.png); background-repeat:no-repeat"&gt; Log In &lt;/div&gt; &lt;/form&gt; </code></pre> <p>Update: Let me add what I noticed further. This form is included in index.php file from another php file named header.php. I have tried running only the header.php. The form works alright in that case in chrome. But including it in index.php does not work.</p>
    singulars
    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