Note that there are some explanatory texts on larger screens.

plurals
  1. POForm Submit without Refreshing using Plugin (malsup)
    text
    copied!<p>I just created a form submit without refreshing using this plugin : <a href="http://malsup.github.com/jquery.form.js" rel="nofollow">http://malsup.github.com/jquery.form.js</a></p> <p>The simple example can be seen at <a href="http://jquery.malsup.com/form/" rel="nofollow">http://jquery.malsup.com/form/</a></p> <p>I don't what I was doing, it was worked fine before until I modified something that I don't remember.</p> <p>When I click SAVE, it should be processed on the background and it should stay on the same page. But now, it doesn't and it redirect me to the action page (process-001.php)</p> <p>I created another page using the same method, and it works just fine.</p> <p>Can you see if I'm doing it wrong?</p> <p>Here is the form :</p> <pre><code>&lt;div id="submit-form"&gt; &lt;form action="web-block/forms/process-001.php" id="select-block" class="general-form" method="post" enctype="multipart/form-data"&gt; &lt;div class="input-wrap"&gt; &lt;input class="clearme" name="Headline" value="&lt;?php echo $Headline;?&gt;" id="headline"/&gt; &lt;/div&gt; &lt;div class="input-wrap"&gt; &lt;textarea class="clearme" name="Sub-Headline" id="subheadline"&gt;&lt;?php echo $SubHeadline ;?&gt;&lt;/textarea&gt; &lt;/div&gt; &lt;label&gt;Bottom Left Image&lt;/label&gt; &lt;div class="up-mask"&gt; &lt;span class="file-wrapper"&gt; &lt;input type="file" name="Pics" class="photo" id="pics" /&gt; &lt;span class="button"&gt; &lt;span class="default-txt"&gt;Upload Photo&lt;/span&gt; &lt;/span&gt; &lt;/span&gt; &lt;/div&gt;&lt;!-- .up-mask --&gt; &lt;input type="hidden" name="Key" id="Key" value="&lt;?php echo $Key;?&gt;"/&gt; &lt;input type="submit" class="submit-btn" value="SAVE" /&gt; &lt;span class="save-notice"&gt;Your changed has been saved!&lt;/span&gt; &lt;/form&gt; &lt;/div&gt; </code></pre> <p>The Javascript :</p> <pre><code>&lt;script&gt; // wait for the DOM to be loaded $(document).ready(function() { // bind 'myForm' and provide a simple callback function $('#select-block').ajaxForm(function() { alert("Thank you for your comment!"); }); }); &lt;/script&gt; </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