peterbz Posted August 17, 2008 Share Posted August 17, 2008 I've noticed that in many sites such as YouTube and Facebook, they have features such as Add to Friends or Add to Favourites which automatically updates their database without refresh or going to another page. For example, when I click on ADD TO FAVOURITES in YouTube, it doesn't require refreshing of pages and it just dynamically pops up a box underneath the button that says "This video has been added to your favourties" I was just wondering how this can be accomplished. How would you update information to the database and dynamically re-populating information/layout on the page without refreshing? Does this require AJAX? If so, what would I need for scripting with AJAX? Does it require additional support or do servers that can run PHP already have the capabilities to run AJAX (please don't mind me if what I'm saying doesn't really make sense as I have no knowledge of what AJAX really does). Any help would be appreciated. Thank you for your time! Quote Link to comment Share on other sites More sharing options...
Mchl Posted August 17, 2008 Share Posted August 17, 2008 I think nothing extra is needed to start using AJAX. On the client-side these are some JavaScript scripts that send requests to server, and update pages according to received data. Quote Link to comment Share on other sites More sharing options...
trq Posted August 17, 2008 Share Posted August 17, 2008 Ajax is a cross between client side Javascrirpt and any server side language (ie php). No real extra support is required accepting Javascript enabled browsers. Quote Link to comment Share on other sites More sharing options...
Barand Posted August 17, 2008 Share Posted August 17, 2008 There's a sample AJAX app in my sig Quote Link to comment Share on other sites More sharing options...
peterbz Posted August 17, 2008 Author Share Posted August 17, 2008 So AJAX is basically Javascript talking to PHP or other server-side language? Can you please give me a sample or beginner tutorial similar to how the example I stated earlier can be accomplished? Thanks for your help! Quote Link to comment Share on other sites More sharing options...
Stephen Posted August 17, 2008 Share Posted August 17, 2008 So AJAX is basically Javascript talking to PHP or other server-side language? Can you please give me a sample or beginner tutorial similar to how the example I stated earlier can be accomplished? Thanks for your help! ... http://members.aol.com/barryaandrew/xmlhttp/article.html There's a sample AJAX app in my sig Quote Link to comment Share on other sites More sharing options...
dezkit Posted August 17, 2008 Share Posted August 17, 2008 Not to be rude, baarand, but your site looks bad on firefox Quote Link to comment Share on other sites More sharing options...
redarrow Posted August 17, 2008 Share Posted August 17, 2008 Here a php way for you......... <?php $friends_name="redarrow"; $x="Your friend $friends_name name has been added <br> Thank you"; echo"<a href='".$_SERVER['PHP_SELF']."?enter=go&friends_name=$friends_name'>Add A Friend</a>"; if($_GET['enter']=="go"){ //update the database echo " <br><br>$x<br><br>"; } ?> Quote Link to comment Share on other sites More sharing options...
Barand Posted August 17, 2008 Share Posted August 17, 2008 I'm a coder, not a designer. My sites look bad on any browser. (Are you still using DOS 3?) Quote Link to comment Share on other sites More sharing options...
redarrow Posted August 17, 2008 Share Posted August 17, 2008 Barand website is grate it designed to learn programming php code and functions and i think it looks grate ((And i think it a good looking website)) Used the website quite a lot to learn..................... Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.