Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa HTML html program

Have Programming Question? Ask it here!
 
 
 


vinay kumar reddy
html program
1 Answer(s)      3 years and 5 months ago
Posted in : HTML


Create a set of checkboxes with the below text: Which company do you work in? Infosys TCS Wipro Microsoft Google None of these If â??None of theseâ?? is selected with any other, show a error message â??Invalid selectionâ??.


Advertisement
View Answers

February 25, 2011 at 1:35 PM


JavaScript Check box Validation

<html>
<script>
Array.prototype.contains = function (element) {
for (var i = 0; i < this.length; i++) {
if (this[i] == element) {
return true;
}
}
return false;
}
function validate(){
var array = new Array();
var total=""
for(var i=0; i < document.f.company.length; i++){
if(document.f.company[i].checked)
array[i]=document.f.company[i].value;
}
if(array.contains("None of these")&&array.length>1){
alert("Invalid Selection");
}
return false;
}
</script>
<form name="f">
Which company do you work in?<br>
<input type="checkbox" name="company" value="Infosys">Infosys<br>
<input type="checkbox" name="company" value="TCS">TCS<br>
<input type="checkbox" name="company" value="Wipro">Wipro<br>
<input type="checkbox" name="company" value="Microsoft">Microsoft<br>
<input type="checkbox" name="company" value="Google">Google<br>
<input type="checkbox" name="company" value="None of these">None of these<br>
<input type="button" value="Check" onclick="validate();">
</form>


Related Tutorials/Questions & Answers:
html program
html program  Create a set of checkboxes with the below text: Which company do you work in? Infosys TCS Wipro Microsoft Google None of these If â??None of theseâ?? is selected with any other, show a error message â?
html program to create home page
html program to create home page  html program to create home page
Advertisements
write a program for creating html page with images and 2 buttons
write a program for creating html page with images and 2 buttons  write a program for creating html page with images and 2 buttons
html
html  sir i am new to eclipse and i am created a html program and also tomcat is running successfully in side the eclipse.but now how i deploy that html program in the eclipse
html
html   write a html program to print "HELLO WORD"in red coaler font size 12 and italic stile   Here is a html code that display the message "Hello World" in red font with size 12 and in italics. <html> <
HTML
HTML  What is Semantic HTML? What are the reasons for validating a HTML
HTML
HTML  What is Semantic HTML? What are the reasons for validating a HTML
HTML
HTML  What is SPAN in HTML
html
html  How to add the calendar in html code
html
html  diffrence between html and xml
HTML
HTML  What is HTML? What is a Hypertext link
Html
Html  What is HTML? What is a Hypertext link
HTML
HTML  What is BODY in HTML document
HTML
HTML  What is HTML? What is a Hypertext link
html
add a header in the html page  what we can do to add a header in the html page
html
html  what we can do to add a header in the html page
html
html  what we can do to add a header in the html page
HTML
HTML  how can we give the unlimited size in the html
html
html  i want a registration page in html with good background
html
html  how to convert html page into jsp page
HTML
HTML  What is a tag? How can we use MARQUEE in HTML
HTML
HTML  How do we specify page breaks in HTML
HTML
HTML  Hi, What is the full form of HTML? Thanks   Hi, The HTML stands for HyperText Markup Language. HTML is used to create webpage for world wide web. Web pages are accessed by web browsers and then shown
html
html  Can we Access database through html page and how,if not then why
html
Adding Header in HTML  what we can do to add a header in the html page
html
html  how we can give the form actions in html after register button in the login page
HTML
HTML  How do we create a link? What are the three types of form tags in HTML
html
html  For what is used HTML?   Using HTML we can create a Web Page which can be viewed through a Web Browser over Internet. HTML describes... or the End Tag is defined as </> . The whole HTML document is enclosed
Html
Html  in the web page if judge select the age and category then automatically under that conditions the details will be display in the form of grid give me that code in html and java
Html
Html  i am select the dateofbirth through the html browser.but it can not save into the sql server 2008 database.any special code required to store the date in database by using java servlets
HTML
HTML  how can we design the gird form view in html i want the following fields in the grid form The fields are Name of the candidate,Title... me the coding for this in html
HTML
HTML  in html how can we can upload the file <tr> <td><strong>Video of the work:</strong> <td><b>... the file give me the code for this in html and java
HTML
HTML  I have created an info.html file for the applet.The class file is located in a directory different from the HTML file.The info.html file I have created is below. <HTML> <HEAD> <BODY> <APPLET Code
Html
:48:44 PM Author : SAMSUNG --%> <%@page contentType="text/html" pageEncoding="UTF-8"%> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01...; <head> <meta http-equiv="Content-Type" content="text/html
Html
:48:44 PM Author : SAMSUNG --%> <%@page contentType="text/html" pageEncoding="UTF-8"%> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01...; <head> <meta http-equiv="Content-Type" content="text/html
Html
Html  I was designing a webpage, i need to create selection boxes one beside other, how i'll be able to do it using HTML code, Please give me a sample code for that... looking forward for your usefull code
html
html  Create a web page with the following using HTML i) To embed an image map in a web page ii) To fix the hot spots iii) Show all the related information when the hot spots are clicked.please reply me sir
HTML
where i can store in the database SEND ME THE CODE FOR THIS IN JAVA AND HTML
Html
Html  in html form for the address by using input as textarea i am writing the code as <tr> <td valign="top"><strong>Address: </strong></td> <td><textarea name="Address" rows="8
html
html   HTML document with Javascript to count the number of vowels... is the code ..I hope this will solve your problems : <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML> <HEAD> <TITLE>
Html
Html  can we send data from one html page to another html page? if yes how?   Yes, using javascript. 1)page1.html: <html> <form type=get action="page2.html"> <table> <tr> <td>First Name
HTML
it shows as null. here is the html code for date of birth: <tr> <
How to pass and catch HTML parameters to a Java program using REST services?(without using servlet/jsp)
How to pass and catch HTML parameters to a Java program using REST services... and catch HTML parameters to a Java program using REST services?(without using... username and password from HTML file, passes these parameters to a JAVA file through
Simple program to combine all html,ajax,java,servlets,jsp,json - Java Beginners
Simple program to combine all html,ajax,java,servlets,jsp,json  Hi, I learned Java,servlets,jsp basics, html, ajax, json and css. I want to do a program which is a combination of all those technology. For that, i planned
program
program  write a html program in show table and this word in box
HTML
HTML       HTML is used for creating the web pages on Internet. HTML is mostly used on the web for the transfer of information from a website
HTML
HTML - Hypertext markup language tutorials Learn HTML with the help of many examples. We have created many easy to understand HTML examples. These examples will help you in understanding HTML very quickly HTML is used to create web
Html tag inside out implicit object
on the browser. To make this program run use out object inside which define some html...Html tag inside out implicit object          In this program we are going to use
Example program to pass value from Html to java script
Example program to pass value from Html to java script... html code to java script easily. To show this we have created an example Html page... the HTML page. We have created a button and it calls the hello() function defined
HTML WITH AJAX
HTML WITH AJAX  I WANT A SIMPLE HTML AJAX PROGRAM WHICH GETS ANY STRING STRING AS INPUT AND GIVES THE RESULT
Advertisements
 

 

 

DMCA.com