Share on Google+Share on Google+

1 Answer(s)      5 years and 10 months ago
Posted in : HTML

provide me html program to form a registration form using controls like radio button for gender, displaying of alert message when have not entered a value .....


View Answers

May 30, 2011 at 11:35 AM


<script >

function validate(){
    if ( == ""){
        alert ( "Please enter name." );;
        return false;

  if (document.form.address.value == ""){
        alert ( "Please enter address." );
        return false;

    if ( ([0].checked == false ) && ([1].checked == false ) ){
        alert ( "Please choose Gender: M or F" );[0].focus();
        return false;
    if ( document.form.qua.selectedIndex == 0 ){
        alert ( "Please select Qualification." );
        return false;
    alert ( "Please select Specialization." );
     return false;  
    if ((document.form.lang1.checked == false) &&(document.form.lang2.checked == false) &&(document.form.lang3.checked == false)&&(document.form.lang4.checked == false))
        alert ('You didn\'t choose any of the checkboxes!');
        return false;
        var oRadio = document.forms[0].elements[radio].value;
    return true;
    function multiselect(select) {  
        var valid = false;  
        for(var i = 0; i < select.length; i++) {  
            if(select.options[i].selected) {  
                valid = true;  
     return valid;  
<form name="form" method="post" onsubmit="return validate();">
<tr><td>Enter Name</td><td><input type="text" name="name"></td></tr>
<tr><td>Enter Address</td><td><textarea rows="4" cols="8" name="address"></textarea></td></tr>
<tr><td>Gender</td><td><input type="radio" name="radio">M<input type="radio" name="radio">F</td></tr>
<tr><td>Qualification</td><td><select name="qua"><option value="BTech">BTech</option><option value="BTech">MBA</option><option value="BTech">MCA</option><option value="BTech">MTech</option></select></td></tr>
<tr><td>Specialization</td><td><select id="specialization" name="specialization" multiple="multiple" ><option value="Software">Software</option><option value="Hardware">Hardware</option><option value="Electrical">Electrical</option><option value="Mechanical">Mechanical</option><option value="Finance">Finance</option><option value="Finance">Marketing</option></select></td></tr>
<tr><td>Languages</td><td><input type="checkbox" name="lang1" value="Hindi">Hindi<input type="checkbox" name="lang2" value="English">English<input type="checkbox" name="lang3" value="French">French<input type="checkbox" name="lang4" value="German">German</td></tr>
<tr><td><input type="submit" value="Submit" ></td><td><input type="reset"></td></tr>

Related Tutorials/Questions & Answers:
Nag(Beginner)  sir i am new to java.. i want to know what topics comes under core java, adv. java and also the remaining topics... plz tell me   Java Tutorials
java beginner
java beginner  hai a i'm beginner 2 java... i want to fetch data from database using combo box(drop down list) without using javascript...when i click list(ex:countrys should b selected)selected country should get inserted
jAVA BEGINNER PROBLEMS  I need the program that takes from standard input an expression without left parenthesis and prints the equivalent infix expression with the parenthesis inserted??? Like EXAMPLE: 1+2)3-4)5-6
Hibernate programming tutorial for beginner
Hibernate programming tutorial for beginner  Hi, I am beginner in Hibernate and I wish to learn it quickly. I am hoping to learn the latest ORM... the link: Hibernate beginner tutorial. This link contains many tutorials
Servlet Tutorial for beginner
Servlet Tutorial for beginner  Hi, I am beginner in Servlet. I have learned the JSP a little bit. Now I wan't to learn Servlet. Tell me the URL to learn Servlet? Thanks   Servlet's are server-side programming language
SQL for Beginner
SQL for Beginner      ... the easiest elaborative examples for the beginner. The beginner will reached into the immediate result as the SQL command is submitted. It bring the beginner
beginner need help with online ordering program please
beginner need help with online ordering program please  I have created a program for an online ordering system and now have to add error handling and a few other things my teacher doesn't teach well is there a template I can go
Hibernate beginner tutorial
Hibernate the beginner tutorial - Essential Hibernate tutorials for beginner... in starting with the Hibernate framework. As a beginner in Hibernate you will learn... learning the beginner Hibernate tutorials you can start learning the advanced
Tutorial for total beginner in Java
Tutorial for total beginner in Java - Explains the Basics of Java programming language. This is a video tutorial for total beginner in Java. In this video... language. This video is for total beginner in Java which will teach how to create
SQL Tutorials for Beginner
SQL Tutorials for Beginner       SQL for Beginner The Tutorial brings  a unique introduction on SQL for beginners, who
How a beginner can start Java Programming?
How a beginner can start Java Programming?  I Just have programming knowledge of C & C++. Let's know how I can learn Java? Is there any Java tutorial for beginners on website? Thanks   Hi, Since you
Java Spring Hibernate Struts Training How to display button as a link in vaadin? hi change navbar dropdown color in bootstrap How to remove the background color of bootstrap menu bar? How to change color of opened Bootstrap drop down toggle? Setting bootstrap container background color Help school all activities and admision process.. add one row after another date make a webpage HTMl HTMl Source code how to apply globalisation to a world wide application how to print HTML using javascript or Jquery How to recover from google panda update? How to survive google panda 4.0 update How to find if you have been hit by Panda 4.0 Design a web page using XHTML and JavaScript that does the followings: ffmpeg converting file mp4 to mov JavaScript How to Disable Catch-all Emails on CPanel z-index always on top What is Web hosting Database and HTML web development trainee Uploading files Image Gallery Image Gallery dropdown How to redirect from a HTML page? Easiest method for expiring the css and js headers HTML WITH AJAX VB 6 Read Web Page Header string palindrom using vbscript? html button How to add mod_deflate to apache without recompiling How to use place hoder in IE(version : 8) Html Software Question div align left css Fetching data from excel file on other website and display in interactive graph form where do I find the fix for tree view catalog not expanding and collapsing correctly for roseindia shopping cart 1.1 pass to next page to enter into a particular page only if the username,password and listbox value mtches hi Cricket stadium ticket booking design Need some help creating an order form. HTML div tag HTML div tag


Advertisement null