i am using image upload script as...., <html> <head> </head> <center> <body bgcolor="#ffffff" text="#000000" link="#0000ff" vlink="#800080" alink="#ff0000"> <?php $max_no_img=2; echo "<table CLASS='hme'><td>"; echo "<form method=post action=addimgck.php enctype='multipart/form-data' onsubmit='showLoading()'>"; echo "<table class='inner' BORDER=0>"; for($i=1; $i<=$max_no_img; $i++) { echo "<tr><td><font COLOR='#000000' FACE='verdana' SIZE=2>Images $i</td><td> <input type=file name='img[$i]' class='bginput' Id='bginput'></td></tr>"; } echo "<tr><td></td><td colspan=2> <input type=submit value='Upload Images'></td></tr>"; echo "</form> </table>"; echo "</td></table>"; ?> <script LANGUAGE="JavaScript"> function showLoading() { // Add a box to contain the message. var box = document.createElement('div'); box.style.position = 'absolute'; box.style.zIndex = '1'; box.style.width = '250px'; box.style.margin = '15px ' + ((document.body.offsetWidth / 2) - (250 / 2)) + 'px'; box.style.fontFamily = 'Verdana, Arial, serif'; document.body.appendChild(box); // Add the "Please wait" header var message = document.createElement('span'); message.id = 'loading_header'; message.style.display = 'block'; message.style.fontSize = '120%'; message.style.fontWeight = 'bold'; message.style.textAlign = 'center'; message.innerHTML = 'Please wait'; box.appendChild(message); // Add the subheader message var message = document.createElement('span'); message.id = 'loading_message'; message.style.display = 'block'; message.style.fontSize = '100%'; message.style.textAlign = 'center'; message.innerHTML = 'Your files are being uploaded.'; box.appendChild(message); // Add a loading image. var img = document.createElement('img'); img.setAttribute('src', './loading.gif'); img.style.display = 'block'; img.style.width = '220px'; img.style.height = '19px'; img.style.margin = '15px auto'; box.appendChild(img); } </script> </body> </html> PHP: Its working fine.., when i click upload image button, it was showing the please wait script then adding images successfullly but.., But if i press back button in my opera browser..., i am seeing please wait script again.., how can i avoid that check the image hear
<?php header("Cache-Control: no-cache, must-revalidate"); header("Expires: Sat, 26 Jul 1997 05:00:00 GMT"); $max_no_img=2; echo "<table CLASS='hme'><td>"; ...... PHP:
Appreciate you help, but i did what you say..., but friend am getting the error...! Warning: Cannot modify header information - headers already sent by (output started at ......\index.php:10) in ............\index.php on line 12 PHP:
Yes, this way should work. <?php header("Cache-Control: no-cache, must-revalidate"); header("Expires: Sat, 26 Jul 1997 05:00:00 GMT"); ?> <html> <head> </head> <center> <body bgcolor="#ffffff" text="#000000" link="#0000ff" vlink="#800080" alink="#ff0000"> PHP: Just move them up to the top of your codefile
Ya now no error...., but problem was not solved.....! i click on submitt button, it uploads images successfully with showing please wait... while.. blabla once update completed.., when i press back button in my browser, it again showing the please wait... while.. blabla, just like above
hello Scripts man, whats there....., nothing don't make any fake comments please frined..,this is very important for me
ya its appearing in opera..., and in remaining browsers loading image not appearing...! Ohh..., any body suggest like this script i mean., loading on submit.