function not calling on onload but calling on onclick
Posted: Thu Sep 17, 2009 11:36 pm
Dear friends,
I am facing a problem, I am working on ajax and i want to get the desired result on onload of the body.
and i am using the code:
<script language="javascript" type="text/javascript">
window.onLoad = show_images(<?php echo $lotid; ?>);
</script>
which called the same function easily but the response of ajax is not coming on the desired div. so the error message appears i.e. Done, But with an error.
but when i called the same function on the onclick event the result is 100% correct and i got the response from the ajax
please help me what is i am missing through onload body way that i cannot get the desired result.
Waiting for your reply.
Thanks and Regards
I am facing a problem, I am working on ajax and i want to get the desired result on onload of the body.
and i am using the code:
<script language="javascript" type="text/javascript">
window.onLoad = show_images(<?php echo $lotid; ?>);
</script>
which called the same function easily but the response of ajax is not coming on the desired div. so the error message appears i.e. Done, But with an error.
but when i called the same function on the onclick event the result is 100% correct and i got the response from the ajax
please help me what is i am missing through onload body way that i cannot get the desired result.
Waiting for your reply.
Thanks and Regards