Need guidence with Ajax
Posted 17 May 2011 - 09:07 AM
I am New to Web developing and Working on File maker web site. I need to create and retrieve the data at same time (with conditions). I think the best idea will be integrate Ajax with PHP. But didn't found any good resource to learn how to integrate this. Can some one provide sample file ? or is there any recommended books or Video Tutorials ?
Thanks and waiting for some one's reply
Posted 17 May 2011 - 02:54 PM
Ajax is a great way to go, but does take a little to get your head around. Once you get it, you don't want to go back. I can recommend Jquery to make things easier. (cross browser compatible with fallbacks). I have used many other ways but this is the most common and does seem to get attention and updates regularly as a framework. Also, you can use it for many other things that you will no doubt want in the future such as manipulation of the dom. (document object model.)
here is a code snippet that covers the jquery part. also you need the php that will modify the record using your parameters fed across to it in post or get.
document.getElementById('divID<?php echo $FormNumber2;?>').innerHTML="<IMG SRC ='jqgrid37/spinner/spinner-large.gif'>";
document.getElementById('divID<?php echo $FormNumber2;?>').innerHTML="";
of course you need your page setup with the following link and the files in place to support jquery
You then just use this post param or others you send in your php edit.php
Hope this helps some.