Exercise AJAX and Javascript


Solution
Download the solution to this exercise in a zip file exercise-ajax1.zip.

Multiplication

Create a small PHP program for multiplying two numbers. It must answer the folowing URL : multiply.php?x=3&y=4 should return a document containing only 7 (you can do this in a Servlet if you want).
Write a small html page with two fields and a button. When the button is pressed, send using AJAX the content of the two fields the your multiplication program and print the result inside a field.

Create a dynamic table

Create a form with two fields: col and ro and one button Create.
You create dynamically (using Javascript) a table containing col columns and ro rows.