473,508 Members | 2,343 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

I want value from 2nd dropdown box to show

1 New Member
Question is: How on earth can I create a 2nd drop down menu, which is greyed out if first drop down isn't selected. If 1st drop down box has been selected, and when second drop down has been selected, I want certain text to show up.

<html>
<head>
<title>Titled</title>
<script language="JavaScript">
var actDiv;
function chklayer(v) {
if (actDiv) {
actDiv.style.display="none";
}
if(v>0){
actDiv = document.getElementById("Layer"+v);
actDiv.style.display="block";
}
}
</script>
</head>

<body>
<form name="form1" method="post" action="">
<div style="position:absolute; left:15px; top:90px; width:455px; height:131px; z-index:1;">
<div id="Layer1" style="display:none;">
I want this text to show if a value in the 2nd drop down box has been chosen</div>
<div id="Layer2" style="display:none;">
I want this text to show if a value in the 2nd drop down box has been chosen</div>
<div id="Layer3" style="display:none;">
I want this text to show if a value in the 2nd drop down box has been chosen</div>
</div>
<p>&nbsp;</p>
<p>
<select name="type" onchange="chklayer(this.value);">
<option value="0">Please Select:</option>
<option value="1">Add a Report</option>
<option value="2">Manage a Report</option>
<option value="3">File Upload snd Report Usage</option>
</select>
</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
</form>

</body>
</html>
Feb 19 '10 #1
0 1244

Sign in to post your reply or Sign up for a free account.

Similar topics

8
18303
by: Lyn | last post by:
Hi, Can anyone tell me how the initial value displayed in Combo Box is determined when a form is opened? I am loading the dropdown from one field ("CategoryName") of a table, with "ORDER BY ". ...
1
7420
by: Eric W. Holzapfel | last post by:
Hello Group, As far as a dropdownlist, is there a way to access both values for the datatextfield (like a name, etc) AND the value of the datavaluefield (like a record number, or index etc). ...
2
4533
by: Mike Collins | last post by:
I cannot get the correct drop down list value from a drop down I have on my web form. I get the initial value that was loaded in the list. It was asked by someone else what the autopostback was...
2
1581
by: Bruno Alexandre | last post by:
Hi guys, I'm using Javascript to dynamically add to a dropdown values like for ( i=0; i<tv.length; i++ ) { selectDDAvisCtrl.options = new Option(tv, tv); } and I use ...
6
6258
by: suresh Chowdary | last post by:
Hi All, depending upon text box entry i want to show drop down box with respective values. means if user enters 'ls' in the text box i want to show the values like 'she','he' in dropdown box it...
10
2707
by: bootzwiz | last post by:
Hi, I have two dropdowns. In first dropdown i have two languages say english, persian. When i select english in 2nd dropdown iam able to show list of english movies. Problem is i need first...
1
2884
by: empiresolutions | last post by:
Hello fellow code junkies, I am using the "Ajax dynamic list" http://dhtmlgoodies.com/index.html?whichScript=ajax-dynamic-list and i think its the best out there. I have found a compatibility...
5
27367
by: =?Utf-8?B?QnJlbmRlbiBCaXhsZXI=?= | last post by:
Hello. I am reading a value from a table and trying to determine if that value exists in a list of values associated with a dropdownlist. If so, I select the value, otherwise, I don't. I haven't...
13
1482
by: =?Utf-8?B?RG9uYWxkIEZpc2hlcg==?= | last post by:
Hello. I'm trying to capture a controls value: a dropdown box with two selections (either "Red" or "Blue") keeps returning the value "Red" even if "Blue" is selected?
3
2779
by: John | last post by:
I have two dropdown lists that I have bound to a datatable and set the DataTextField and DataValueField for. Both lists show the values I expect from the database. However, when I need to access...
0
7123
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7324
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7382
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7042
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7495
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5627
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4707
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
1
766
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
418
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.