Hi
My problem is that I want Other textbox tobe deactivated when page loads, but when user selects Other drop down box of Company Certification: then Other textbox should be activated.
Here is the PHP code which is displaying this page
<?php
echo "<select name=\"company_certification\">";
echo "<option value=\"ISO2001\">ISO2001</option>";
echo "<option value=\"OTHER\">Other</option>";
echo "<option value=\"None\">None</option>";
echo "</select>";
?>
<?php echo "Other:"; ?>
<?php echo zen_draw_input_field('other_certification', '', zen_set_field_length(TABLE_ADDRESS_BOOK, 'customer_company_other_certification', '40') . ' id="other_certification"') . (zen_not_null(ENTRY_COMPANY_TEXT) ? '<span class="alert">' . ENTRY_COMPANY_TEXT . '</span>': ''); ?>
And I found a java script which is this
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
<script type="text/javascript">
function change(val)
{
if (val=="Other")
{
document.getElementById("txt").innerHTML="<input type=\"text\" id=\"other\" name=\"other\"/>";
}
else
{
document.getElementById("txt").innerHTML="<input type=\"text\" id=\"other\" name=\"other\" disabled/>";
}
}
</script>
</head>
<body>
<form name="f1">
<select name="s1" onchange="change(this.value)" onchange="change(this.value)">
<option value="ISO2000">ISO2000</option>
<option value="ISI">ISI</option>
<option value="Other">Other</option>
</select>
<div id="txt">
<input type="text" id="other" name="other" disabled/>
</div>
</form>
</body>
</html>
Can I use this java script in my php code mentioned above.
Please help me...
Thank you all in advance