[thelist] How to Show/Hide if an option is selected in a pull-down
Jono
ox4dboy at comcast.net
Tue Aug 24 15:26:28 CDT 2004
On 8/24/04 12:26 PM, "Peter Brunone (EasyListBox.com)"
<peter at easylistbox.com> wrote:
>In that case, I guess you'll need to store the original value when the page
>loads. You can do this with a hidden form field, or a global Javascript
>variable if you like. Either way, when you trigger the onChange event, you'll
>have to say "is the new value the same as the original (stored) value?" and if
>it is, you hide the div.
This is a bit over my head at the moment. I don't know much JS, just enough
to be dangerous.
> Also, I noticed that you're still calling the old showHide function below. Do
> you have that working yet?
If I remove the "old showHide function"...
function showHide (id)
{
var style = document.getElementById(id).style
if (style.visibility == "hidden")
style.visibility = "visible";
else
style.visibility = "hidden";
}
...the show/hide functionality no longer works?
More information about the thelist
mailing list