SlideShare a Scribd company logo
1. An HTML document contains 3 text fields and a button within a form. Mark-up the page and code in JavaScript such that 
The first two text fields can be input with [0-9] and the back space. 
The third text field should be read-only. 
Clicking the button should display the sum of the inputs given in the first two text fields, in the last text field, viz. the one which is read-only 
If either of the fields is not provided with an input, a click on the button should prompt the user to fill it in. 
2. Modify the above such that, the button is to be initially disabled. And, it will toggle to enabled-state as soon as there are inputs given to both the text fields. Deleting either of the inputs will readily cause the button to toggle to disabled state. In brief, one can click the button to get the sum, as mentioned in [Problem No. 1], only when both of the text fields contain non-empty value. 
3. An HTML document contains a form, which has 5 text fields (may be arbitrarily assumed). The form can be submitted only when all the fields are filled-in. If one or more fields are left blank, an alert message should be displayed, informing the user of all these fields. Also, the first of text fields left blank, will get the focus with the cursor. 
4. Add the following functionalities to [Problem No. 3]: 
As the user finishes up filling in a text field and hits the RETURN key, the next field is focused with the cursor and the input in the field auto-capitalizes itself. 
5. Today’s lessons: (JavaScript) 
Using timers 
Using <option> within <select> 
To submit a form without a submit button 
<table> 
<frameset> and <frame>

More Related Content

What's hot

Microsoft word -_microsoft_word_exercise
Microsoft word -_microsoft_word_exerciseMicrosoft word -_microsoft_word_exercise
Microsoft word -_microsoft_word_exerciseSubeesh Up
 
Microsoft word 2010
Microsoft word 2010Microsoft word 2010
Microsoft word 2010Sea Seanghay
 
Formulae
FormulaeFormulae
Formulae
thangamalar94
 
CLASS VI COMPUTERS
CLASS VI COMPUTERS CLASS VI COMPUTERS
CLASS VI COMPUTERS
Rc Os
 
Time warner cable webmail
Time warner cable webmailTime warner cable webmail
Time warner cable webmail
Digital Marketing
 
Whatsapp survery report
Whatsapp survery  reportWhatsapp survery  report
Whatsapp survery report
Karan Kukreja
 
Office 2010 Mail Merge With Word and Excel by Jandy Warner
Office 2010 Mail Merge With Word and Excel by Jandy WarnerOffice 2010 Mail Merge With Word and Excel by Jandy Warner
Office 2010 Mail Merge With Word and Excel by Jandy WarnerJandy Warner
 
Distance materials
Distance materialsDistance materials
Distance materials92240
 
Distance materials
Distance materialsDistance materials
Distance materialsmusalam
 
Dynamic Web Pages Ch 2 V1.0
Dynamic Web Pages Ch 2 V1.0Dynamic Web Pages Ch 2 V1.0
Dynamic Web Pages Ch 2 V1.0Cathie101
 
Mail merge
Mail mergeMail merge
Mail merge
mike_1576
 
Lesson4 Formatting Text
Lesson4 Formatting TextLesson4 Formatting Text
Lesson4 Formatting Textguevarra_2000
 
Africa Press List - User-Client how to create a press release
Africa Press List - User-Client   how to create a press releaseAfrica Press List - User-Client   how to create a press release
Africa Press List - User-Client how to create a press release
Africa Business Communities
 
Microsoft excel shortcut keys
Microsoft excel shortcut keysMicrosoft excel shortcut keys
Microsoft excel shortcut keys
Aashi90100
 
Mail merge
Mail mergeMail merge
Mail merge
Sherry Brott
 
Excel for beginners class 2
Excel for beginners class 2Excel for beginners class 2
Excel for beginners class 2
Carlstadt Public Library
 
Excel for beginners class 3
Excel for beginners class 3Excel for beginners class 3
Excel for beginners class 3
Carlstadt Public Library
 

What's hot (18)

Microsoft word -_microsoft_word_exercise
Microsoft word -_microsoft_word_exerciseMicrosoft word -_microsoft_word_exercise
Microsoft word -_microsoft_word_exercise
 
Microsoft word 2010
Microsoft word 2010Microsoft word 2010
Microsoft word 2010
 
Formulae
FormulaeFormulae
Formulae
 
CLASS VI COMPUTERS
CLASS VI COMPUTERS CLASS VI COMPUTERS
CLASS VI COMPUTERS
 
Time warner cable webmail
Time warner cable webmailTime warner cable webmail
Time warner cable webmail
 
Whatsapp survery report
Whatsapp survery  reportWhatsapp survery  report
Whatsapp survery report
 
Office 2010 Mail Merge With Word and Excel by Jandy Warner
Office 2010 Mail Merge With Word and Excel by Jandy WarnerOffice 2010 Mail Merge With Word and Excel by Jandy Warner
Office 2010 Mail Merge With Word and Excel by Jandy Warner
 
Distance materials
Distance materialsDistance materials
Distance materials
 
Distance materials
Distance materialsDistance materials
Distance materials
 
Dynamic Web Pages Ch 2 V1.0
Dynamic Web Pages Ch 2 V1.0Dynamic Web Pages Ch 2 V1.0
Dynamic Web Pages Ch 2 V1.0
 
Mail merge
Mail mergeMail merge
Mail merge
 
Lesson4 Formatting Text
Lesson4 Formatting TextLesson4 Formatting Text
Lesson4 Formatting Text
 
Africa Press List - User-Client how to create a press release
Africa Press List - User-Client   how to create a press releaseAfrica Press List - User-Client   how to create a press release
Africa Press List - User-Client how to create a press release
 
Macros
MacrosMacros
Macros
 
Microsoft excel shortcut keys
Microsoft excel shortcut keysMicrosoft excel shortcut keys
Microsoft excel shortcut keys
 
Mail merge
Mail mergeMail merge
Mail merge
 
Excel for beginners class 2
Excel for beginners class 2Excel for beginners class 2
Excel for beginners class 2
 
Excel for beginners class 3
Excel for beginners class 3Excel for beginners class 3
Excel for beginners class 3
 

Viewers also liked

The Fine Art of JavaScript Event Handling
The Fine Art of JavaScript Event HandlingThe Fine Art of JavaScript Event Handling
The Fine Art of JavaScript Event Handling
Yorick Phoenix
 
JavaScript From Scratch: Events
JavaScript From Scratch: EventsJavaScript From Scratch: Events
JavaScript From Scratch: Events
Michael Girouard
 
Yahoo presentation: JavaScript Events
Yahoo presentation: JavaScript EventsYahoo presentation: JavaScript Events
Yahoo presentation: JavaScript Events
Peter-Paul Koch
 
Javascript and DOM
Javascript and DOMJavascript and DOM
Javascript and DOM
Brian Moschel
 
JavaScript: Events Handling
JavaScript: Events HandlingJavaScript: Events Handling
JavaScript: Events Handling
Yuriy Bezgachnyuk
 
JavaScript - An Introduction
JavaScript - An IntroductionJavaScript - An Introduction
JavaScript - An Introduction
Manvendra Singh
 
jQuery Essentials
jQuery EssentialsjQuery Essentials
jQuery Essentials
Marc Grabanski
 

Viewers also liked (8)

The Fine Art of JavaScript Event Handling
The Fine Art of JavaScript Event HandlingThe Fine Art of JavaScript Event Handling
The Fine Art of JavaScript Event Handling
 
JavaScript and BOM events
JavaScript and BOM eventsJavaScript and BOM events
JavaScript and BOM events
 
JavaScript From Scratch: Events
JavaScript From Scratch: EventsJavaScript From Scratch: Events
JavaScript From Scratch: Events
 
Yahoo presentation: JavaScript Events
Yahoo presentation: JavaScript EventsYahoo presentation: JavaScript Events
Yahoo presentation: JavaScript Events
 
Javascript and DOM
Javascript and DOMJavascript and DOM
Javascript and DOM
 
JavaScript: Events Handling
JavaScript: Events HandlingJavaScript: Events Handling
JavaScript: Events Handling
 
JavaScript - An Introduction
JavaScript - An IntroductionJavaScript - An Introduction
JavaScript - An Introduction
 
jQuery Essentials
jQuery EssentialsjQuery Essentials
jQuery Essentials
 

More from Soham Sengupta

Spring method-level-secuirty
Spring method-level-secuirtySpring method-level-secuirty
Spring method-level-secuirty
Soham Sengupta
 
Spring security mvc-1
Spring security mvc-1Spring security mvc-1
Spring security mvc-1
Soham Sengupta
 
Networking assignment 2
Networking assignment 2Networking assignment 2
Networking assignment 2
Soham Sengupta
 
Networking assignment 1
Networking assignment 1Networking assignment 1
Networking assignment 1
Soham Sengupta
 
Sohams cryptography basics
Sohams cryptography basicsSohams cryptography basics
Sohams cryptography basics
Soham Sengupta
 
Network programming1
Network programming1Network programming1
Network programming1
Soham Sengupta
 
JSR-82 Bluetooth tutorial
JSR-82 Bluetooth tutorialJSR-82 Bluetooth tutorial
JSR-82 Bluetooth tutorial
Soham Sengupta
 
Xmpp and java
Xmpp and javaXmpp and java
Xmpp and java
Soham Sengupta
 
Core java day2
Core java day2Core java day2
Core java day2
Soham Sengupta
 
Core java day1
Core java day1Core java day1
Core java day1
Soham Sengupta
 
Core java day4
Core java day4Core java day4
Core java day4
Soham Sengupta
 
Core java day5
Core java day5Core java day5
Core java day5
Soham Sengupta
 
Exceptions
ExceptionsExceptions
Exceptions
Soham Sengupta
 
Java.lang.object
Java.lang.objectJava.lang.object
Java.lang.object
Soham Sengupta
 
Jsp1
Jsp1Jsp1
Soham web security
Soham web securitySoham web security
Soham web security
Soham Sengupta
 
Html tables and_javascript
Html tables and_javascriptHtml tables and_javascript
Html tables and_javascript
Soham Sengupta
 
Html javascript
Html javascriptHtml javascript
Html javascript
Soham Sengupta
 
Java script
Java scriptJava script
Java script
Soham Sengupta
 
Sohamsg ajax
Sohamsg ajaxSohamsg ajax
Sohamsg ajax
Soham Sengupta
 

More from Soham Sengupta (20)

Spring method-level-secuirty
Spring method-level-secuirtySpring method-level-secuirty
Spring method-level-secuirty
 
Spring security mvc-1
Spring security mvc-1Spring security mvc-1
Spring security mvc-1
 
Networking assignment 2
Networking assignment 2Networking assignment 2
Networking assignment 2
 
Networking assignment 1
Networking assignment 1Networking assignment 1
Networking assignment 1
 
Sohams cryptography basics
Sohams cryptography basicsSohams cryptography basics
Sohams cryptography basics
 
Network programming1
Network programming1Network programming1
Network programming1
 
JSR-82 Bluetooth tutorial
JSR-82 Bluetooth tutorialJSR-82 Bluetooth tutorial
JSR-82 Bluetooth tutorial
 
Xmpp and java
Xmpp and javaXmpp and java
Xmpp and java
 
Core java day2
Core java day2Core java day2
Core java day2
 
Core java day1
Core java day1Core java day1
Core java day1
 
Core java day4
Core java day4Core java day4
Core java day4
 
Core java day5
Core java day5Core java day5
Core java day5
 
Exceptions
ExceptionsExceptions
Exceptions
 
Java.lang.object
Java.lang.objectJava.lang.object
Java.lang.object
 
Jsp1
Jsp1Jsp1
Jsp1
 
Soham web security
Soham web securitySoham web security
Soham web security
 
Html tables and_javascript
Html tables and_javascriptHtml tables and_javascript
Html tables and_javascript
 
Html javascript
Html javascriptHtml javascript
Html javascript
 
Java script
Java scriptJava script
Java script
 
Sohamsg ajax
Sohamsg ajaxSohamsg ajax
Sohamsg ajax
 

Recently uploaded

Cyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdfCyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdf
Cyanic lab
 
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Shahin Sheidaei
 
Advanced Flow Concepts Every Developer Should Know
Advanced Flow Concepts Every Developer Should KnowAdvanced Flow Concepts Every Developer Should Know
Advanced Flow Concepts Every Developer Should Know
Peter Caitens
 
Lecture 1 Introduction to games development
Lecture 1 Introduction to games developmentLecture 1 Introduction to games development
Lecture 1 Introduction to games development
abdulrafaychaudhry
 
Explore Modern SharePoint Templates for 2024
Explore Modern SharePoint Templates for 2024Explore Modern SharePoint Templates for 2024
Explore Modern SharePoint Templates for 2024
Sharepoint Designs
 
Vitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume MontevideoVitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume Montevideo
Vitthal Shirke
 
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERRORTROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
Tier1 app
 
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Globus
 
How Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptxHow Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptx
wottaspaceseo
 
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.ILBeyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Natan Silnitsky
 
Multiple Your Crypto Portfolio with the Innovative Features of Advanced Crypt...
Multiple Your Crypto Portfolio with the Innovative Features of Advanced Crypt...Multiple Your Crypto Portfolio with the Innovative Features of Advanced Crypt...
Multiple Your Crypto Portfolio with the Innovative Features of Advanced Crypt...
Hivelance Technology
 
BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024
Ortus Solutions, Corp
 
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Globus
 
Quarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden ExtensionsQuarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden Extensions
Max Andersen
 
Designing for Privacy in Amazon Web Services
Designing for Privacy in Amazon Web ServicesDesigning for Privacy in Amazon Web Services
Designing for Privacy in Amazon Web Services
KrzysztofKkol1
 
GlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote sessionGlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote session
Globus
 
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Globus
 
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data AnalysisProviding Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Globus
 
top nidhi software solution freedownload
top nidhi software solution freedownloadtop nidhi software solution freedownload
top nidhi software solution freedownload
vrstrong314
 
First Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User EndpointsFirst Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User Endpoints
Globus
 

Recently uploaded (20)

Cyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdfCyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdf
 
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
 
Advanced Flow Concepts Every Developer Should Know
Advanced Flow Concepts Every Developer Should KnowAdvanced Flow Concepts Every Developer Should Know
Advanced Flow Concepts Every Developer Should Know
 
Lecture 1 Introduction to games development
Lecture 1 Introduction to games developmentLecture 1 Introduction to games development
Lecture 1 Introduction to games development
 
Explore Modern SharePoint Templates for 2024
Explore Modern SharePoint Templates for 2024Explore Modern SharePoint Templates for 2024
Explore Modern SharePoint Templates for 2024
 
Vitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume MontevideoVitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume Montevideo
 
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERRORTROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
 
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
 
How Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptxHow Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptx
 
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.ILBeyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
 
Multiple Your Crypto Portfolio with the Innovative Features of Advanced Crypt...
Multiple Your Crypto Portfolio with the Innovative Features of Advanced Crypt...Multiple Your Crypto Portfolio with the Innovative Features of Advanced Crypt...
Multiple Your Crypto Portfolio with the Innovative Features of Advanced Crypt...
 
BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024
 
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
 
Quarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden ExtensionsQuarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden Extensions
 
Designing for Privacy in Amazon Web Services
Designing for Privacy in Amazon Web ServicesDesigning for Privacy in Amazon Web Services
Designing for Privacy in Amazon Web Services
 
GlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote sessionGlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote session
 
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
 
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data AnalysisProviding Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
 
top nidhi software solution freedownload
top nidhi software solution freedownloadtop nidhi software solution freedownload
top nidhi software solution freedownload
 
First Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User EndpointsFirst Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User Endpoints
 

JavaScript event handling assignment

  • 1. 1. An HTML document contains 3 text fields and a button within a form. Mark-up the page and code in JavaScript such that The first two text fields can be input with [0-9] and the back space. The third text field should be read-only. Clicking the button should display the sum of the inputs given in the first two text fields, in the last text field, viz. the one which is read-only If either of the fields is not provided with an input, a click on the button should prompt the user to fill it in. 2. Modify the above such that, the button is to be initially disabled. And, it will toggle to enabled-state as soon as there are inputs given to both the text fields. Deleting either of the inputs will readily cause the button to toggle to disabled state. In brief, one can click the button to get the sum, as mentioned in [Problem No. 1], only when both of the text fields contain non-empty value. 3. An HTML document contains a form, which has 5 text fields (may be arbitrarily assumed). The form can be submitted only when all the fields are filled-in. If one or more fields are left blank, an alert message should be displayed, informing the user of all these fields. Also, the first of text fields left blank, will get the focus with the cursor. 4. Add the following functionalities to [Problem No. 3]: As the user finishes up filling in a text field and hits the RETURN key, the next field is focused with the cursor and the input in the field auto-capitalizes itself. 5. Today’s lessons: (JavaScript) Using timers Using <option> within <select> To submit a form without a submit button <table> <frameset> and <frame>