if you are using prototype:
<script type="text/javascript">
function myfunction(){
var el = $('myInput').value; //gets the value of the drop down
if(el == 'select'){
$('mytext').style.display = "";
}
}
</script>
<select id="myInput" onchange="myfunction()">
<option>textarea</option>
<option>string</option>
</select>
<!-- HIDDEN TEXTAREA -->
<textarea id="mytext" style="display:none"></textarea>
On Apr 29, 6:48 am, seb <[EMAIL PROTECTED]> wrote:
> Conceptually, this can be done this way :
>
> For the options your users should enter, enclose a textarea field inside
> a DIV that is by default on visibility:hidden CSS style.
>
> On the dropdown, trigger the onChange Javascript event to check out if
> the 'dropdown' option is selected. If yes, change dynamically the
> visibility style of the textarea to "visible" using Javascript.
>
> That should do the job !
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---