Any1 knows javascript
Hi,
In the next script:
I am working on minimal symbols check. If you have only text box it's easy, but i need to figure a way to check text only when Other is selected
<html>
<head>
<title>Bad Link Report</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" href="style.css" type="text/css">
<script language="JavaScript">
<!--
function enableFld(elementId,tostate){
eval("document.someform." + elementId + ".disabled="+tostate+";");
}
//-->
</script>
<script language="javascript" type="text/javascript">
<!--
function imposeMaxLength(Object, MaxLen)
{
return (Object.value.length <= MaxLen);
}
-->
</script>
</head>
<body leftMargin="0" topMargin="0" MARGINHEIGHT="0" MARGINWIDTH="0">
<br>
<table align="center" width="202" cellspacing="0" cellpadding="0">
<tr>
<td class="black" align="center">
<table width="200" border="0" cellspacing="0" cellpadding="3">
<tr>
<td class="black"><b>Bad Link Report</b></td>
</tr>
<tr>
<td align="left" bgcolor="#BFD8F1">
Thank you for your time<br>
Click to report bad link<br><br>
<form action="/bad.php" method="post" name="someform">
<input type="hidden" name="id" value="137477">
<input type="radio" name="op" value="badlink" checked onclick="javascript:enableFld('bao_text','true');" />bad link<br>
<input type="radio" name="op" value="doublelink" onclick="javascript:enableFld('bao_text','true');" />double link<br>
<input type="radio" name="op" value="wrongname" onclick="javascript:enableFld('bao_text','true');" />wrong name<br>
<input type="radio" name="op" value="other" onclick="javascript:enableFld('bao_text','false'); " />Other:<br>
<textarea name="bao_text" rows="2" cols="20" onkeypress="return imposeMaxLength(this, 15);" disabled="disabled"></textarea><br>
<input type="submit" name="submit" value="Report" class="button">
</form>
<br>
<tr>
<td class=black></td>
</tr>
</table>
</td>
</tr>
</table>
</html>
Any1?
Thanks!
|