|
INTERVIEW QUESTIONS
PROGRAMMING LANGUAGES
HTML
DETAILS
Question: How can I require that fields be filled in, or filled in correctly?
Answer: Have the server-side (e.g., CGI) program that processes the form submission send an error message if the field is not filled in properly. Ideally, this error message should include a copy of the original form with the original (incomplete or incorrect) data filled in as the default values for the form fields. The Perl CGI.pm module provides helpful mechanisms for returning partially completed forms to the user. In addition, you could use JavaScript in the form's ONSUBMIT attribute to check the form data. If JavaScript support is enabled, then the ONSUBMIT event handler can inform the user of the problem and return false to prevent the form from being submitted. Note that the server-side program should not rely upon the checking done by the client-side script.
|
|
|
Category |
HTML Interview Questions & Answers -
Exam Mode /
Learning Mode
|
Rating |
(0.2) By 7550 users |
Added on |
4/27/2014 |
Views |
68334 |
Rate it! |
|
|
Question:
How can I require that fields be filled in, or filled in correctly?
Answer:
Have the server-side (e.g., CGI) program that processes the form submission send an error message if the field is not filled in properly. Ideally, this error message should include a copy of the original form with the original (incomplete or incorrect) data filled in as the default values for the form fields. The Perl CGI.pm module provides helpful mechanisms for returning partially completed forms to the user. In addition, you could use JavaScript in the form's ONSUBMIT attribute to check the form data. If JavaScript support is enabled, then the ONSUBMIT event handler can inform the user of the problem and return false to prevent the form from being submitted. Note that the server-side program should not rely upon the checking done by the client-side script. Source: CoolInterview.com
If you have the better answer, then send it to us. We will display your answer after the approval.
Rules to Post Answers in CoolInterview.com:-
- There should not be any Spelling Mistakes.
- There should not be any Gramatical Errors.
- Answers must not contain any bad words.
- Answers should not be the repeat of same answer, already approved.
- Answer should be complete in itself.
|
|
Related Questions |
View Answer |
|
What is the code for a webpage which consists of an icon at the bottom and that icon shouldn't
|
View Answer
|
|
What are the basic steps of learning file handling in c language?
|
View Answer
|
|
Write a program to find the L.C.M. and G.C.D.of two numbers?
|
View Answer
|
|
What is the difference between jscript and javascript?
|
View Answer
|
|
How can use MARQUEE in HTML?
|
View Answer
|
|
HTML is a Programming Language or Scripting Language?
|
View Answer
|
|
What’s the Vuser Generator?
|
View Answer
|
|
What is HTML?
|
View Answer
|
Please Note: We keep on updating better answers to this site. In case you are looking for Jobs, Pls Click Here Vyoms.com - Best Freshers & Experienced Jobs Website.
View All HTML Interview Questions & Answers - Exam Mode /
Learning Mode
|