WPL Questions
WPL Questions
School of Engineering
Department of Computer Science Engineering
Web Programming Lab
PART A
Program 1
Program 3
Write a JavaScript to design a simple calculator to perform the following operations: sum,
product, difference and quotient.
Program 4 a)
Write a JavaScript code that displays text “TEXT-GROWING” with increasing font size in the
interval of 100ms in RED COLOR, when the font size reaches 50pt it displays
“TEXT-SHRINKING” in BLUE color. Then the font size decreases to 5pt.
Develop and demonstrate a HTML5 file that includes JavaScript script that uses functions for
the following problems:
a. Parameter: A string
c. Parameter: A number
Program 5
Create a sample form program that collects the first name, last name, email, user id, password
and confirms password from the user. All the inputs are mandatory and email address entered
should be in correct format. Also, the values entered in the password and confirm password
textboxes should be the same. After validating using JavaScript, In output display proper error
messages in red color just next to the textbox where there is an error.
Program 6.
2. Define a method called “fill_table(month,len)” to fill the table with date, according to the
month & number of dates (len).
Program 7
Write the program that process the JSON data you’re getting from the Weather API and return
an object with only the data you require .
Program 8
Use a weather API to add weather data to a web page by making use of ‘promises’.The URL of
the weather API is https://handlers.education.launchcode.org/static/weather.json.
Program 9
Write a server in Node.JS which will accept the name of the candidate via a form (client
program) and displays back the contents to the browser.
Program 10
Write a MongoDB program which accepts the username,phone number,password and email
from HTML form. The submitted data must be inserted into the database using the POST
method. If the insertion is successful, Redirect to a different web page with a proper message .