473,471 Members | 4,124 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Need a help about drop down lists - Bit Urgent

21 New Member
Hi
i am working on drop down list boxes.
My main aim is to display a table if the option is selected in the list box
i have kept the table as invisible
please guide me towards the solution
here goes the code




[HTML]<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Untitled Document</title>
<script type="text/javascript">
function change()
{
if(document.forms[0].city.options.value=="vizag")
{
document.forms[0].list.style.display=true;
}
}
</script>
</head>

<body>
Films in City : <select name="city">
<option value="" selected>Select a city</option>
<option value="vizag" onClick="change()">Vizag</option>
</select>
<table id="list" style="display:none; ">
<tr>
<td height="87">Parugu</td>
<td>Jagadamba</td>
<td>Telugu</td>
</tr>
<tr>
<td height="95">Jaane Tu Ya Jaane Na</td>
<td>RamaDevi</td>
<td>Hindi</td>
</tr>
<tr>
<td height="163">Hancock</td>
<td>Sarada</td>
<td>English</td>
</tr>
</table>
</body>
</html>
[/HTML]


thanks in advance

kash
Jul 25 '08 #1
3 1050
RamananKalirajan
608 Contributor
Hello Kash, Here is your working code

[HTML]<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Untitled Document</title>
<script type="text/javascript">
function change()
{
var x = document.getElementById('mySelect').selectedIndex;
if(x==1)
document.getElementById('list').style.display = 'block';
}
function doThis()
{
document.getElementById('list').style.display = 'none';
}
</script>
</head>

<body onload="doThis()">
Films in City : <select name="city" id='mySelect' onChange="change()">
<option value="" selected>Select a city</option>
<option value="vizag">Vizag</option>
</select>

<table id="list" border="1" cellspacing="3" cellpadding="3">
<tr>
<td height="87">Parugu</td>
<td>Jagadamba</td>
<td>Telugu</td>
</tr>
<tr>
<td height="95">Jaane Tu Ya Jaane Na</td>
<td>RamaDevi</td>
<td>Hindi</td>
</tr>
<tr>
<td height="163">Hancock</td>
<td>Sarada</td>
<td>English</td>
</tr>
</table>
</body>
</html>[/HTML]

Enjoy

Regards
Ramanan Kalirajan
Jul 25 '08 #2
kashhere
21 New Member
Thank you very much ramanan

kash
Jul 26 '08 #3
RamananKalirajan
608 Contributor
Thank you very much ramanan

kash
No Probs. If you need any help pls post it. I will help you out.

Regards
Ramanan Kalirajan
Jul 28 '08 #4

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

Similar topics

11
by: my-wings | last post by:
I think I've painted myself into a corner, and I'm hoping someone can help me out. I have a table of books (tblBooks), which includes a field (strPubName) for Publisher Name and another field...
2
by: Yoshitha | last post by:
hi I have 2 drop down lists in my application.1st list ontains itmes like java,jsp,swings,vb.net etc.2nd list contains percentage i.e it conatains the items like 50,60,70,80,90,100. i will...
1
by: csgraham74 | last post by:
Hi Guys, I am currently building a web aplication in ASP.Net. On the onload event of a page a have a function to populate the many drop down lists on my page. I have one parameter table which...
5
by: dsmasters | last post by:
Hey there, I have been piecing this menu system together from a couple of different sources and can almost see the end the of the tunnel. This is based on the Suckerfish Dropdowns which then...
3
by: Jeff User | last post by:
Greeting I built asp.net (V1.1) page. I want to use this button to reset SelectedIndex=0 on several drop down lists. However, I do not want to post back to server. The point is to avoid the...
0
by: kajir | last post by:
Hi, I am new at using ASP.Net 2.0. I have various drop down lists on my master page. They refer to an SQL database. I also have a menu on the master page. I can select the values in the drop...
22
by: Archanak | last post by:
Hi, I am using 2-level CSS Drop Down Menu in my perl/CGI program. here is the code. #!c:/perl/bin/perl.exe use CGI qw(:standard);
3
by: jcassan | last post by:
Hello folks. I am new to these forums and have something, which has been stumping me for little while. I am using pspell to spellcheck a scrolling textbox (textarea) containing user input. I...
5
by: bennever | last post by:
Hi, I plan to use drop down lists to populate team results and will use the standard country/state drop down lists as the base code. The question: how can I populate multiple (5) states from...
0
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
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
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
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...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
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...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

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.