The way AJAX has the ability to load in extra data into a website without reloading the whole web page, has always given me a buzz.
Now with the help of jquery .load()
page it's become possible for even me to make a page function in that classic AJAX style.
The code below is taken from my work on a php twitter app. What I got it to do was, expand tweets that are replies when clicked.
It passes the ID of the Tweet to fetch when it calls the getTweet.php file.
Over view of the code below.
Line 20: has a Div with the id of the Tweet that was replied too.
There also is the onclick function that calls the getTweet function when clicked.
Line7: Is the GetTweet script.
Line9-11 is just an alert if the file requested fails.
Line8: Does all the work, It gets the id of the div that was clicked and passes it when loading the file to the file getTweet.php
To get code, visit here
Thanks to Regs
for the help
Other related posts:
EASEUS Todo Backup – my favourite backup software
Jolicloud on the netbook
A couple of new things on my EeePC 1001HA