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.............

You best to post your code so we can have look at it

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

hi
try window.onload='function_name'

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">

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.

hai all i want is to stop the image alone from being cached...i dont want the text to be disturbed...........

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.