GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Webmaster Q & Fuckin' A (https://gfy.com/forumdisplay.php?f=27)
-   -   Any1 knows javascript (https://gfy.com/showthread.php?t=950526)

Startzone 01-27-2010 11:19 AM

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!

adult-help 01-27-2010 01:46 PM

So you want to hide textarea and show it only if Others radio box is selected? Right?

Startzone 01-28-2010 04:26 AM

Hi,

No I only want people to have to fill in textarea if the choose "Others" and then minimize the length to 15.

Thanks!


All times are GMT -7. The time now is 08:00 AM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc