Hi there
use jQuery methods
http://www.jquery.com
HTML Code:
<img id="myImg" src="someSrc.jpg" style="visibility:hidden" />
<script type="text/javascript" src="http://code.jquery.com/jquery-latest.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){ // eqv to page_load
$("#myImg").fadeOut(0);
});
function validateValues(){
$.ajax({
url: "yourpage.php?yourparams=values",
type: "get",
success: function(result){
if(result.toString() == "OK"){ // == "YOUR_PHP_RETURNED_VALUE"
$("#myImg").css('visibility', 'visible');
$("#myImg").fadeIn("slow");
}else{
// do other thing (maybe alert to user to check values)
}
} // success
}); //$.ajax
} // validateValues
</script>