jQuery to Show Data Randomly
In this first jQuery tutorial we will develop a simple program that Show Data Randomly from server and displays on the user browser. In this example we will be calling a server side PHP script to get the Random Data. You can easily replace PHP with JSP, or ASP program.
Steps to develop the Data Show Randomly
Create php file to that prints the current server data. Here is the code of PHP script (time.php).
Write HTML page to call the script.php. Create a new file (randomArray.html) and add the following code into it:
makes load the to script.php file.
Following code intercepts the ajax call success and then sets the data into "quote" div:
When you run the program in browser it will look like following screen shot:
Learn from experts! Attend jQuery Training classes.