che_anj
08-29-2007, 03:42 PM
Hello anybody has an idea on how to display textbox when selecting item in the select box.
heres my code...
<script type="text/javascript">
function displaytext()
{
var actiontype = document.forms['actions']['eventcat'];
var schedule = document.forms['actions']['date3'];
if (actiontype.options[actiontype.selectedIndex].value == "1")
{
schedule.style.display = 'inline';
}
else if (actiontype.options[actiontype.selectedIndex].value == "2")
{
schedule.style.display = 'inline';
}
else
{
schedule.style.display = 'none';
}
}
</script>
<?php
echo '<form name="actions">
<tr><td>Action Type</td>
<td>'.html_select("eventcat",0,array_of("eventcat"),"",$actype).'</td>
</tr>
<tr><td>Interview Schedule</td>
<td>
<input type="text" name="date3" id="sel3" size="20" readonly value="'.$rowa[edate].'"><input type="reset" value=" ... "
onclick="return showCalendar(\'sel3\', \'%Y-%m-%d\');">
</td>
</tr>
</form>';
?>
When I click an item in the select box the Interview Schedule row will display.. tnx..
heres my code...
<script type="text/javascript">
function displaytext()
{
var actiontype = document.forms['actions']['eventcat'];
var schedule = document.forms['actions']['date3'];
if (actiontype.options[actiontype.selectedIndex].value == "1")
{
schedule.style.display = 'inline';
}
else if (actiontype.options[actiontype.selectedIndex].value == "2")
{
schedule.style.display = 'inline';
}
else
{
schedule.style.display = 'none';
}
}
</script>
<?php
echo '<form name="actions">
<tr><td>Action Type</td>
<td>'.html_select("eventcat",0,array_of("eventcat"),"",$actype).'</td>
</tr>
<tr><td>Interview Schedule</td>
<td>
<input type="text" name="date3" id="sel3" size="20" readonly value="'.$rowa[edate].'"><input type="reset" value=" ... "
onclick="return showCalendar(\'sel3\', \'%Y-%m-%d\');">
</td>
</tr>
</form>';
?>
When I click an item in the select box the Interview Schedule row will display.. tnx..