DaniWeb IT Discussion Community

DaniWeb IT Discussion Community (http://www.daniweb.com/forums/)
-   JavaScript / DHTML / AJAX (http://www.daniweb.com/forums/forum117.html)
-   -   problems with firefox2.0.0.11 (http://www.daniweb.com/forums/thread108951.html)

ashercharles Feb 13th, 2008 7:28 am
problems with firefox2.0.0.11
 
hai guys
i have generated a captcha image
and i want the image to change every time the user reaches the page..........
the code seem to work well with IE but in firefox the image does not get changed
.......i tried "onload" command but the image goes on for an infinite refresh............

pls lemme know if there is any solution.............

peter_budo Feb 13th, 2008 1:53 pm
Re: problems with firefox2.0.0.11
 
You best to post your code so we can have look at it

ShawnCplus Feb 13th, 2008 4:00 pm
Re: problems with firefox2.0.0.11
 
If you are using a server-side language then manipulate the header to send
Cache-Control: no-cache
Pragma: no-cache
This tells the browser to get a fresh copy

DangerDev Feb 14th, 2008 1:52 am
Re: problems with firefox2.0.0.11
 
hi
try window.onload='function_name'

ashercharles Feb 14th, 2008 5:30 am
Re: problems with firefox2.0.0.11
 
sorry guys i forgot to paste the code.............
but here it is



function captcha_refresh() {
e=document.getElementById('captcha');
dv=new Date();
document.myform.captcha.value = "";
e.src="/captchamg.php?dummy=" + dv.getTime();
return false;

}


this come unesr the script validate.js.....

ive called it using in the a php code using

<SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript" src="validate.js">

DangerDev Feb 14th, 2008 7:55 am
Re: problems with firefox2.0.0.11
 
if u do that using mouse move event.

on document mouse move event start a timer, if timer is running for 10 or 20 second i.e. page is idle for that much second then call another function which will change the image.
i hope this will help.

ashercharles Feb 25th, 2008 12:49 am
Re: problems with firefox2.0.0.11
 
hai all i want is to stop the image alone from being cached...i dont want the text to be disturbed...........


All times are GMT -4. The time now is 10:48 pm.

Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC