Html Code

Ads
 

Html Code

View Answers

May 19, 2009 at 10:47 AM

Hi Friend,

Try the following code:

<html>
<h2>ComboBox</h2>
<script language="javascript">
var arr = new Array();
arr[0] = new Array("-select-");
arr[1] = new Array("Nokia","Sony","Motorola","Samsung");
arr[2] = new Array("Titan","HMT");
arr[3] = new Array("Liberty","Action","Bata");
arr[4] = new Array("Mercedes","Toyoto","Maruti","Innovo");

function change(combo1)
{
var comboValue = combo1.value;
document.forms["form"].elements["combo2"].options.length=0;
for (var i=0;i<arr[comboValue].length;i++)
{
var option = document.createElement("option");
option.setAttribute('value',i+1);
option.innerHTML = arr[comboValue][i];
document.forms["form"].elements["combo2"].appendChild(option);
}
}
</script>
<form name="form" method="post">
<select name="combo1" onchange="change(this);">
<option value="0">-Select-</option>
<option value="1">Mobiles</option>
<option value="2">Watches</option>
<option value="3">Shoes</option>
<option value="4">Cars</option>
</option>

</select><br />
<select name="combo2">
</select>
</form>
</html>

Thanks

Ads









Related Tutorials/Questions & Answers:
html code for student information?
html code for student information?  html code for student information
Pagination example with html code
Pagination example with html code  Hi, could u please provide pagination code with clear cut explanation. Thanks in advance
Advertisements
HTML - Strikethrough code.
HTML - Strikethrough code. Description : The strike is a html tag. When you... Markup Language</strike> Code : <!DOCTYPE html PUBLIC ".../TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http
HTML link code.
HTML link code. Description : It is also called hyper link. HTML provides...;/a> Code : <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0.../TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml">
HTML - Image link code.
HTML - Image link code. Description : HTML image link is a combination... is  used as a text of anchor tag. Code : <!DOCTYPE html PUBLIC...;h1>Example of HTML Link code.</h1> <p>Please visit
HTML login page code
the complete HTML JavaScript code for User Login Page. Thanks in Advance!   ...: " + form.pwd1.value); return true; }   html registration form code...HTML login page code  Hi all, I am writing my first HTML JavaScrip
how to space images in html code
how to space images in html code  how to space images in html code
what is the code for login page in html
what is the code for login page in html  Hi, I am total beginner in HTML coding. I want to make a login page in HTML to understand the form coding. I think login page is goot topic to start and learn. what is the code for login
what is the code for login page in html
what is the code for login page in html  Hi, I am total beginner in HTML coding. I want to make a login page in HTML to understand the form coding. I think login page is goot topic to start and learn. what is the code for login
what is the code for login page in html
what is the code for login page in html  Hi, I am total beginner in HTML coding. I want to make a login page in HTML to understand the form coding. I think login page is goot topic to start and learn. what is the code for login
HTML Color Code for White
HTML Color Code for White In this page you will find the hexadecimal color code for White color. The hexadecimal color code for white is #FFFFFF or #ffffff... Name Color code Color White  #FFFFFF   See more
html dropdownlist code - JSP-Servlet
html dropdownlist code  hi how to get textfield in html when i select the option others in the dropdown list, pls provide the code?   Hi Friend, Try the following code: function show(){ var op
HTML code example
HTML code examples In this section we are giving many html code examples which will be very useful for developers. The examples of HTML code given here... to create rich web pages and web applications. HTML Code Examples Paragraph
javascript code for search in html file
javascript code for search in html file  Hi, I am looking for javascript code through which we can search data with specific name find in any rows in the table. Example: Id Name P001 A P002 B P003 C P004 P002 P005
HTML Color Code for purple
HTML Color Code for purple In this page you will find the hexadecimal color code for Purple color. The hexadecimal color code for dark purple is #800080. HTML Purple color is of two types: Dark Purple Light Purple Here
View source code of a html page using java ..
View source code of a html page using java ..  I could find the html source code of a web page using the following program, http://download.oracle.com/javase/1.4.2/docs/api/java/net/URLConnection.html i could get the html code
give me source code of webpage creation using html
give me source code of webpage creation using html  how to create a webpage using html
HTML Login Page Code
HTML Login Page Code Here is an example of html login page code... using JavaScript. In this tutorial we are creating a HTML Login page code...? How to Create Student Registration Form with HTML Code
mini project using html,javascript and ms access with source code
mini project using html,javascript and ms access with source code  I want a mini project which uses html and java script and backend as ms access with source code. plz send its important and urgent
How to play FLV video files on Ipad using HTML code or javascript code?
How to play FLV video files on Ipad using HTML code or javascript code?  How to play FLV video files on Ipad using HTML code or javascript code
html
html  How to add the calendar in html code
html report generation in emma code coverage using ANT acript
html report generation in emma code coverage using ANT acript  Hi Deepak, I am using emma code covarage tool and to generate coverage report...(StreamDecoder.java:316) i have written the following code in build.xml
html code for student registration form
html code for student registration form Here is an example of html code... form in HTML?": In the above video instruction we have explained you how to make html page for student registration and validate it with JavaScript
retriving data from sql server using jsp code and placing them in text fields of html code
retriving data from sql server using jsp code and placing them in text fields of html code  Hi, my question is how to retrieve data from sql server 2008 using a jsp file and place the values in the text fields of a html file
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   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  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
is located in a directory different from the HTML file.The info.html file I have created is below. <HTML> <HEAD> <BODY> <APPLET Code = WelcomePage.class width=300 height=300> I want to know if the code
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
the file give me the code for this in html and java...HTML  in html how can we can upload the file <tr> <td><strong>Video of the work:</strong> <td><b>
html
html  diffrence between html and xml

Ads