Note that there are some explanatory texts on larger screens.

plurals
  1. POHow can I add a loader.gif which will show until the image (map) is loaded in PHP
    primarykey
    data
    text
    <p>I've got a world map where the user can select regions or continents to see companies/product sorted by countries of that area. The loading time of the map is a little bit too long so I'd add an loader.gif to it. I know that the way I did it, is not correct since the loader.gif gets only covered once the map is loaded but it's still there. Any idea how to start and stop the loader from showing?</p> <p>Thanks for your feedback</p> <p>This is my code:</p> <pre><code> &lt;?php class kazino { private $db; private $cms; private $valid; private $data; public function __construct() { $reg = Registry::getInstance(); $this-&gt;db = $reg-&gt;get('db'); $this-&gt;cms = $reg-&gt;get('cms'); $this-&gt;valid = $reg-&gt;get('Validate'); $this-&gt;data = $reg-&gt;get('data'); } public function get_kazino() { $lang = language::getLang(); $ret = ' &lt;div class="add_company_link"&gt;&lt;a href="rus/reklama/casino"&gt;' . l::add_casino() . '&lt;/a&gt;&lt;br /&gt;&lt;span&gt;' . l::free() . '&lt;/span&gt;&lt;/div&gt; &lt;div class="casino_loader"&gt;&lt;/div&gt; //THIS IS MY LOADER &lt;div class="start" id="back_map_img" style="text-align:center; width:810px; margin-left:auto; margin-right:auto; "&gt; &lt;img id="Image-Maps" src="styles/them_01/img/blank.gif" usemap="#Image-Maps" border="0" width="810" height="425" alt="" /&gt; &lt;map id="_Image-Maps" name="Image-Maps"&gt; &lt;area shape="poly" coords="605,306,637,288,660,278,668,298,671,280,698,286,713,268,754,292,736,362,694,396,660,386,644,375,621,354,593,353,594,330,596,317," href="' . $lang . '/casino/continent/12" id="Oceania" class="Oceania" alt="Oceania" title="Oceania" /&gt; &lt;area shape="poly" coords="523,98,538,96,543,90,580,97,587,86,620,104,627,117,659,105,657,160,652,197,642,232,653,237,676,248,707,251,695,285,664,274,649,267,631,275,620,277,606,276,579,268,568,253,572,257,566,245,557,236,558,226,565,219,565,209,549,189,560,161,545,163,521,156,519,153,500,127," href="' . $lang . '/casino/continent/8" id="ESAsia" class="ESAsia" alt="East &amp; Southeast Asia" title="East &amp; Southeast Asia" /&gt; &lt;area shape="poly" coords="516,221,512,211,507,198,504,191,497,186,490,174,481,172,478,168,482,165,479,157,476,149,477,142,482,138,486,133,495,132,511,137,516,140,517,150,527,156,539,162,548,162,553,158,561,162,551,184,534,198,534,215,534,218,536,233,525,235," href="' . $lang . '/casino/continent/9" id="SAsia" class="SAsia" alt="South Asia" title="South Asia" /&gt; &lt;area shape="poly" coords="454,127,445,123,437,118,422,112,425,98,421,96,408,88,399,79,398,66,402,62,395,43,422,11,531,15,583,24,627,38,675,41,690,53,673,74,664,104,642,108,629,121,622,118,620,110,623,108,622,101,616,102,608,99,588,86,585,98,575,97,567,97,558,95,544,91,541,96,533,95,521,100,515,108,514,119,502,128,506,133,506,133,494,133,485,135,478,141,474,134,466,131,459,133," href="' . $lang . '/casino/continent/7" id="CAsia" class="CAsia" alt="Central Asia" title="Central Asia" /&gt; &lt;area shape="poly" coords="395,129,407,117,426,114,448,119,454,133,464,131,473,134,480,153,482,164,475,200,461,205,442,210,436,200,428,180,418,163,419,157,416,151," href="' . $lang . '/casino/continent/10" id="MEast" class="MEast" alt="Middle East" title="Middle East" /&gt; &lt;area shape="poly" coords="317,93,319,64,302,54,324,45,350,61,371,40,360,16,386,17,396,36,400,59,394,68,409,88,424,98,419,112,401,124,396,140,389,143,379,140,362,132,350,133,339,136,330,138,316,136," href="' . $lang . '/casino/continent/6" id="Europa" class="Europa" alt="Europa" title="Europa" /&gt; &lt;area shape="poly" coords="327,138,311,154,298,177,296,208,317,238,350,240,364,279,362,299,371,332,381,356,411,348,433,328,451,327,464,283,441,279,444,248,465,213,459,207,443,212,439,206,419,163,415,149,370,142,362,132," href="' . $lang . '/casino/continent/5" id="Africa" class="Africa" alt="Africa" title="Africa" /&gt; &lt;area shape="poly" coords="159,235,152,263,179,332,189,396,204,414,233,413,246,370,253,324,270,283,272,253,221,217,184,204,173,210," href="' . $lang . '/casino/continent/3" id="SAmerica" class="SAmerica" alt="South America" title="South America" /&gt; &lt;area shape="poly" coords="131,203,139,192,157,171,197,185,201,193,192,207,177,204,174,208,165,223,161,233," href="' . $lang . '/casino/continent/2" id="CAmerica" class="CAmerica" alt="Central America" title="Central America" /&gt; &lt;area shape="poly" coords="122,206,128,200,143,195,157,173,174,155,220,126,253,103,257,82,258,81,284,65,363,10,353,0,321,0,0,0,0,28,76,178,96,200," href="' . $lang . '/casino/continent/1" id="NAmerica" class="NAmerica" alt="North America" title="North America" /&gt; &lt;/map&gt; &lt;/div&gt; &lt;div class="select_map"&gt;' . l::select_region() . '&lt;/div&gt; //THIS IS JUST TEXT '; </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.
    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