Wednesday, January 8, 2025

WT-II Assignment-4

 ASSIGNMENT NO. 4: AJAX

 Set A
1. Write AJAX program to read contact.dat file and print the contents of the file in a tabular format when the user clicks on print button. Contact.dat file should contain srno, name, residence number, mobile number, Address. [Enter at least 3 record in contact.dat file]

Solution:-

 

2. Write AJAX program where the user is requested to write his or her name in a text box, and the server keeps sending back responses while the user is typing. If the user name is not entered then the message displayed will be, “Stranger, please tell me your name!”. If the name is Rohit, Virat, Dhoni, Ashwin or Harbhajan , the server responds with “Hello, master <user name>!”. If the name is anything else, the message will be “<user name>, I don’t know you!”.

Solution:-

 


Set B
1. Create TEACHER table as follows TEACHER(tno, tname, qualification, salary). Write Ajax program to select a teachers name and print the selected teachers details.

Solution:-

 


CUSTOMER (cno, cname, city) and  ORDER(ono, odate, shipping address)2. Write Ajax program to print Order details by selecting a Customer’s name. Create table Customer and Order as follows with 1 : M cardinality CUSTOMER (cno, cname, city) and  ORDER(ono, odate, shipping address)

Solution:-

 


Set C
1. Write Ajax program to fetch suggestions when is user is typing in a textbox. (eg like google suggestions. Hint create array of suggestions and matching string will be displayed)

Solution:-

 


2. Write Ajax program to get book details from XML file when user select a book name. Create XML file for storing details of book(title, author, year, price).

Solution:-

 

 

 

No comments:

Post a Comment