?
Solved

Showing layer with list menu

Posted on 2006-11-07
4
Medium Priority
?
133 Views
Last Modified: 2010-04-25
Hi everyone, I always post on here whenever I'm really stuck - and I'm really stuck again, so I hope someone can help!

I have a list box with certain options in in. My last option at the bottom of the list menu is called "Other".

This works fine, no problems.

What I'd like to happen is for a text box to appear when I select 'Other' (into which I can type my free-text, "Other" category.

So far, I have figured out how to show and hide layers.... but the show/hide behavoiur is, by deafult, applied to the WHOLE list menu - which means the text box is displayed when ANY of the  options are selected...

Does anyone know how to get this to work?

Thanks!
0
Comment
Question by:jamesEE
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 16

Expert Comment

by:CWS (haripriya)
ID: 17895760
Do you want to make a textbox visible and invisible based on the option selected in the list?

Can u post your working code?
0
 
LVL 25

Accepted Solution

by:
Rouchie earned 500 total points
ID: 17896249
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script type="text/javascript">
function ShowIt(menuValue){
      if(menuValue=='Other'){
            document.getElementById('myText').style.visibility = 'visible';
      } else {
            document.getElementById('myText').style.visibility = 'hidden';
      }
}
</script>
</head>
<body>
<form id="myform" name="myform" action="somepage.html" method="post">
<select id="dropDown" onChange="javascript: ShowIt(document.getElementById('dropDown').value);">
        <option value="0">Some option</option>
      <option value="1">Another option</option>
        <option value="Other">Other</option>
</select>

<br/><br/>
<input type="text" id="myText" name="myText" style="visibility:hidden;" />
</form>
</body>
</html>
0
 
LVL 2

Author Comment

by:jamesEE
ID: 17899334
GREAT!

Works like an absolute charm, many many thanks, Rouchie

Really appreciate your help

0
 
LVL 25

Expert Comment

by:Rouchie
ID: 17899415
You're welcome!
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For those who don't know, Adobe Dreamweaver is a popular commercial web editor that enables you to design, build and manage complex websites. The editor is a WYSIWYG (What You See Is What You Get) web editor, which means that you can create your web…
This article is very specific and is only intended to help if you are installing Dreamweaver 8 in a Windows 7 environment with Office 2007 installed.   I'm not sure why Microsoft tends to release OS' that should not be released but they do.  Windows…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…

800 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question