TRIBHUVAN UNIVERSITY
INSTITUTE OF SCIENCE AND TECHNOLOGY
2080 B.S.
Candidates are required to give their answers in their own words as far as practicable.
Group A
Long Answer QuestionsAttempt any Two questions.
- 1Write HTML script to create HTML form as below and perform form validation using JavaScript. [diagram/image to be added manually] The validation should be as; the username should be of length at least 4 and is required. The password should start with a character and end with # and is required. The country and gender should be checked.
- 2How XML is different from HTML? Write XML script to create XML document containing element Person having sub elements Age, Name and Pincode. Write equivalent XSD for validating restrictions on the elements as the Age should be between10 to 20, the Name should be only accepting either Ram or Shyam and the Pincode should be 3 digit.
- 3Write a server side script in PHP to illustrate inserting and selecting values to and from database table. Create required connection using your own assumptions.
Group B
Short Answer QuestionsAttempt any Eight questions.
- 4Describe the WWW, web client and web server.
- 5What are HTML keyboard events? Write a script to display a message "Hello world" on onkeypress event.
- 6How HTML elements can be accessed using getElementById and getElementByTagName, illustrate using HTML script.
- 7How can you define position property for specifying specific positioning of an HTML element? Write internal CSS to illustrate position of an HTML div.
- 8What is chaining in jQuery? Write a script to illustrate concept of chaining using slideUp and slideDown method.
- 9What is XML? Why is it called extensible? Mention the use of XML.
- 10What is XMLHttpRequest object? Write HTML script with AJAX showing the use of XMLHttpRequest object.
- 11Write a PHP program that includes a function that will take two strings as input argument and print the concatenation of the two strings.
- 12How can you handle session in PHP?