Friday, August 26, 2011

Ajax (programming)

Ajax is a group of interrelated web development methods used on the client-side to create interactive web applications. With Ajax, web applications can send data to, and retrieve data from, a server asynchronously (in the background) without interfering with the display and behavior of the existing page. Data is usually retrieved using the XMLHttpRequest object. Despite the name, the use of XML is not needed (JSON is often used instead), and the requests don't need to be asynchronous.  

Ajax example programs:

Step1
Open the application Macromedia Dreamweaver which image will appear as follows:


  
Step2
Choose a basic HTML page that is above and then click create, the image will appear as follows:



  
Step3
Enter the ajax code below:

<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>ajax1</title>
</head>

<body>
<H1> Welcome new user! </H1>
Please enter your information in the fields below
<form action="/submit">

Name : <input type="text" name="name"/> <br/>
Address : <input type="text" name="address"/> <br/>
City : <select name="city">
<option>Select One from List</option>
<option value="Quezon City">Quezon City</option>
</select>

<br/>
Zip Code : <input type="text" name="zip" size="4"/> <br/>
<input type="submit" value="Submit"/>
</form>
</body>

</html>

Step4
Display the final result:


Good luck hopefully keep the spirit ... ..!!!

0 comments:

Template by : wanto arwan-programing.blogspot.com