views:

357

answers:

1

Hi, i am using iframe to refresh captcha whenever user makes an error in typing captcha text.

this iframe is inside a form which looks like this...

<iframe id="cvbnm" frameborder="0" width="176" height="75" marginheight="0" marginwidth="0">     </iframe>

and whenever user types wrong captcha i am using

 $("#cvbnm").attr("src", "captcha.php");

where captcha.php is a different page where the captcha files are included.

this is working fine in firefox....but does not refresh in ie... please help me....

A: 

You might want to add a jQuery tag to this question.

What's maybe happening is that as the src is staying the same IE isn't generating a new request for the page.

Try

$('#cvbnm').removeAttr('src').attr('src', 'captcha.php');

Or

$('#cvbnm').attr('src', '').attr('src', 'captcha.php');

Update:

Ok, how about adding

parent.frames[FrameID].window.location.reload();

Or

document.getElementById(FrameID).contentDocument.location.reload(true);

I must confess I'm getting this one from here

Evil Andy
captcha.php is a different page..
thanks a lot....it worked...:)