html - Load div when i open the page -
good morning comunity, im new on coding iam sorry if question noob.
i want div pa load automatically php file when open web page, please dont want load interval, load instant when open web.
i tried code im sure not working
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/ libs/jquery/1.3.0/jquery.min.js"> </script> <script type="text/javascript"> $(document).ready(function)() { $('#apdiv3').load('xfile.php'); } ); </script> thank in advance time!!
have checked result debugger firefox's firebug? check network communication see if ajax request completed successfully.
also, can try callback function see if code executed successfully:
$( "#result" ).load( "ajax/test.html", function() { alert( "load performed." ); }); if don't expected output, might problem on server-side.
also... sure using exact code? don't think should close brackets after function
$(document).ready(function) this how it:
$(document).ready(function() { ....
Comments
Post a Comment