Question: Write a file named 7a.htm. A table with a header row that displays all the field names in the SALES table (sales table consists of

Write a file named 7a.htm. A table with a header row that displays all the field names in the SALES table (sales table consists of saleid, saledate, customerid) of your database should be initially visible. This file should have a form with a text field for a user to enter a CUSTOMERID. With each keyup event, an AJAX request is made to a file named 7a.php.

7a.php will take the customerID as a parameter, and produce a response that will consist of a JavaScript function call. If there is no customerID in the SALES table that starts with what is in the textfield, the function call should be not_there(). If there are customerIDs in the database table that start with what is in the text field, the function call should be there(), and it should have arguments that are all the fields of those records in the SALES table.

When 7a.htm receives the response, it should evaluate the function that was returned.

The not_there() function should delete all rows from the table other than the header row.

The there() function should dynamically create rows in the table to display the values.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!