[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

Showing layer with list menu

Posted on 2006-11-07
4
Medium Priority
?
134 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

[Webinar] Lessons on Recovering from Petya

Skyport is working hard to help customers recover from recent attacks, like the Petya worm. This work has brought to light some important lessons. New malware attacks like this can take down your entire environment. Learn from others mistakes on how to prevent Petya like worms.

Question has a verified solution.

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

I still run into .cgi files every now and then. In some instances, I actually prefer the simplicity of a .cgi script to other options. Since I use DreamWeaver extensively, what I needed was a way to open .cgi scripts in Dreamweaver. And I wanted to …
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…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…
Suggested Courses

650 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