Search Results

Search found 4 results on 1 pages for 'guanche'.

Page 1/1 | 1 

  • Animated background image in a hidden <div> doesn't load or loads not animated

    - by Guanche
    Hello, I have spent the whole day trying to make a script which on "submit" hides the form and shows hidden with animated progress bar. The problem is that Internet Explorer doesn't show animated gif images in hidden divs. The images are static. I visited many websites and found a script which uses: document.getElementById(id).style.backgroundImage = 'url(/images/load.gif)'; Finally, my script works in Internet Explorer, Firefox, Opera but... Google Chrome doesn't display the image at all. I see only div text. After many tests I discovered the following: the only way to see the background image in Google Chrome is to include the same image somewhere in the page (outside of hidden div) with 1px dimensions: <img src="/images/load.gif" width="1" heigh="1" /> This did the trick but... after this dirty solution Microsoft Explorer for some reason shows the image as static again. So, my question is: is there any way how to force Gogle Chrome to show the image? Thanks. This is my script: <script language="JavaScript" type="text/javascript"> function ver (id, elementId){ if (document.getElementById('espera').style.visibility == "visible") { return false; }else{ var esplit = document.forms[0]['userfile'].value.split("."); ext = esplit[esplit.length-1]; if (document.forms[0]['userfile'].value == '') { alert('Please select a file'); return false; }else{ if ((ext.toLowerCase() == 'jpg')) { document.getElementById(id).style.position = 'absolute'; document.getElementById(id).style.display = 'inline'; document.getElementById(id).style.visibility = "visible"; document.getElementById(id).style.backgroundImage = 'url(/images/load.gif)'; document.getElementById(id).style.height = "100px"; document.getElementById(id).style.backgroundColor = '#f3f3f3'; document.getElementById(id).style.backgroundRepeat = "no-repeat"; document.getElementById(id).style.backgroundPosition = "50% 50%"; var element; if (document.all) element = document.all[elementId]; else if (document.getElementById) element = document.getElementById(elementId); if (element && element.style) element.style.display = 'none'; return true; }else{ alert('This is not a jpg file'); return false; } } } } </script> <div id="frmDiv"> <form enctype="multipart/form-data" action="/upload.php" method="post" name="upload3" onsubmit="return ver('espera','frmDiv');"> <input type="hidden" name="max_file_size" value="4194304" /> <table border="0" cellspacing="1" cellpadding="2" width="100%"> <tr bgcolor="#f5f5f5"> <td>File (jpg)</td> <td> <input type="file" name="userfile" class="upf" /></td></tr> <tr bgcolor="#f5f5f5"> <td>&nbsp;</td> <td> <input class="upf2" type="submit" name="add" value="Upload" /> </td></tr></table></form> </div> <div id="espera" style="display:none;text-align:center;float:left;width:753px;">&nbsp;<br />&nbsp;<br />&nbsp;<br />&nbsp;<br /> &nbsp;<br />Please wait...<br />&nbsp; </div>

    Read the article

  • Php - please help to find two alternatives for ereg functions

    - by Guanche
    ereg and eregi functions will be deleted from Php. Please help to find alternatives for the following ereg functions: 1) To allow IP addresses only for specific ranges: $targetAddr = "60.37..*..*"; if (!ereg($targetAddr, $_SERVER['REMOTE_ADDR'])) { die; } 2) To replace series of points like ....................... $message = ereg_replace("[.]{3,}", "... ", $message);

    Read the article

  • Php/Mysql - need help to insert and update multiple rows with a single query

    - by Guanche
    Hello, is there any way how in this situation insert and update DB with single queries? $message = 'Hello to all group members'; $userdata = mysql_query("SELECT memberid, membernick FROM members WHERE groupid='$cid'") or die('Error'); while(list($memberid, $membernick) = mysql_fetch_row($userdata)) { $result1 = mysql_query("INSERT INTO messages VALUES (NULL,'$membernick', '$memberid', '$message')") or die('Error'); $result2 = mysql_query("UPDATE users SET new_messages=new_messages+1, total_messages=total_messages+1 WHERE id='$memberid'") or die('Error'); }

    Read the article

  • Php Mailer problem - messages marked as spam -

    - by Guanche
    A few days ago I upgraded Php Mailer and now some email providers my messages mark as spam. This is what I see in the headers of the marked messages: X-SpamTest-Info: {TO: header missing} This is from my php file. $mail->From = $sender; $mail->FromName = $sender_name; $mail->Subject = $subject; $mail->Body = $body; $mail->AddAddress($recipient,$recipient_name); $mail->AddReplyTo($replyto,"No-Reply"); Dont know how to add "to" header and can't understand how it's possible that "to" is missing but email arrives to the correct "to" address...

    Read the article

1