Note that there are some explanatory texts on larger screens.

plurals
  1. POLoader gif implement
    primarykey
    data
    text
    <p>I'm having some problem with implementing loader gif in this form my form is submiting to another page, the procesor page. This is the code:</p> <p>form:</p> <pre><code>&lt;form name="myform" id="myform" action="" method="POST"&gt; &lt;!-- The Name form field --&gt; &lt;div align='center'&gt; &lt;form name="myform" id="myform" action="" method="POST"&gt; &lt;!-- The Name form field --&gt; &lt;font face='candara' size='3' color='#6382A1'&gt;Ime ili prezime:&lt;/font&gt; &lt;input type="text" name="name" id="name" value=""&gt; </code></pre> <p> </p> <pre><code>&lt;meta http-equiv="Content-Type" content="text/html; charset=windows-1250" /&gt; &lt;script type="text/javascript" src="http://code.jquery.com/jquery-1.4.2.min.js"&gt;&lt;/script&gt; &lt;script type="text/javascript" src="http://ajax.microsoft.com/ajax/jquery.validate/1.7/jquery.validate.min.js"&gt;&lt;/script&gt; &lt;script type="text/javascript"&gt; $(document).ready(function(){ $("#myform").validate({ debug: false, rules: { name: "required", }, messages: { name: "Unesite podatke.", }, submitHandler: function(form) { // do other stuff for a valid form $.post('process.php', $("#myform").serialize(), function(data) { $('#results').html(data); }); } }); }); &lt;/script&gt; &lt;style&gt; label.error { width: 250px; display: inline; color: red; font-family:candara;} &lt;/style&gt; &lt;!-- We will output the results from process.php here --&gt; &lt;br&gt;&lt;div id="results"&gt;&lt;/div&gt; </code></pre> <p>So I'm wondering where and how to implement loader gif to be shown before search result? </p> <p>this is the loader gif:</p> <pre><code>&lt;!--LOADER!--&gt; &lt;br&gt;&lt;div id="loadingGif" style="display:none; background: url(slike_izgled/transparent_loader.png);" align="center"&gt;&lt;img src='ajax-loader.gif'&gt; &lt;br&gt;&lt;font face='candara' size='3'&gt;&lt;b&gt;Pretražujem bazu podataka, molim pricekajte...&lt;/b&gt;&lt;/font&gt;&lt;/div&gt; &lt;script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.0/jquery.min.js"&gt;&lt;/script&gt; &lt;script&gt; $("form").submit(function(e) { //e.preventDefault(); $("#loadingGif").show(); }); &lt;/script&gt; &lt;!--LOADER END!--&gt; </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