Re: Show / Hide a field depending on drop down list
Tuesday, January 30, 2007 08:24 PM
I can't help with the exact syntax, but in roundabout terms: (1) draw the input field on the page with a known 'id' you can lookup via script later; include a style attribute that sets display to 'none' (? I believe ... or maybe sets visibility to something) if you want it to be hidden by default. (2) Add a script function (in the head or via a link rel) that, when called, checks the value of the drop-down box and compare against 'ADD_NEW' (or whatever). Based on this, look up the input field by its id and sets its style.display to 'block' (?). (3) Add an event handler to the drop-down box that calls the function in step 2.