UNC
School of Information and Library Science
INLS760 – Web Databases, Spring 2008
INLS 760

Main Page

Announcements

Calendar/Notes

Assignments

Links

Course Policies

Grades

In-Class Exercise #7

Ajax

Write an Ajax calculator that presents three text boxes labelled, "operand 1", "operand 2", and "result", and four buttons labelled, "+", "-", "*", and "/".

When one of the buttons is clicked, the operands and the operator (i.e. button pressed) should be sent to a server-side script called calc.php that will compute the result and send it back using Ajax.

The client-side page should contain JavaScript code that processes the result when it is returned and writes it into the result text box.

Do not simply compute the result on the client-side. The goal of this exercise is to gain experience using Ajax.