Help on website designing in php.?

have seen on yahoo register page there is a image of some text that you have to punch in the text box. that is for validation. I have been able to write a code in PHP to generate that type of images but my question is that on that page there is a refresh button to get another image if you cannot read that image. now i want to know how to create that link so that image of my page is also refreshed without reloading the whole page. I am using PHP.