Jing
Posts: 4
|
| Posted: 03/25/2010, 3:30 PM |
|
Hi,
I wonder if codecharge can implement this function. I have a drop down list with options yes and no. If yes is selected, then it will pop up the other two text fields. By default, the text fields are hidden. If switch from yes to no, the text fields will be hidden again. The condition in the features seem like does not compare values. Can you give me any idea to implement it?
Thank you!
Jing
_________________
Jing |
 |
 |
melvyn
Posts: 333
|
| Posted: 03/25/2010, 8:28 PM |
|
You need a simple Javascript event.
<select onchanche="javascript:hideshow(this.value)"> ...
Then create a javascript function to hide/show according to the received value:
function hideshow(thevalue){
if(thevalue == "yes"){
document.forms['thefields'].field.style.display= 'block';
}else{
document.forms['thefields'].field.style.display= 'none';
}
}
Where the whole thing you want to hide/show must have the div id ="thefields"
Check and get used to it.
It's much more easier with JQuery function toggle.
_________________
Melvyn Perez
Puro Codigo
http://purocodigo.com |
 |
 |
Jing
Posts: 4
|
| Posted: 03/26/2010, 1:43 PM |
|
Thank you!
_________________
Jing |
 |
 |
|