First Example (uses hyperlinks to load all content into main arena.)
Second Example
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
<input type="button" id="dog" value="send" /> <div class="theplace"></div> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script> <script> $(document).ready(function(){ $("#dog").click(function(){ alert("Hi"); $('.theplace').load('singleclientcall.php', { }); }); }); </script> |
Error Catching
There is no file called singleclientcallx.php, so the error message will appear.
You can also show an error in the called file and echo out an error also.
1 2 3 4 5 6 7 8 |
$('#nextplace').load('../singleclientcallx.php',function(responseTxt,statusTxt,xhr){ if(statusTxt=="success") alert("GoogleAPI Call loaded successfully!"); if(statusTxt=="error") alert("BING API Not found"); }); |