I need immediate help with this script. When I change the drop down box to 'Picture' I need the the 'reason2' field to automatically have a value of 'When a real picture gets uploaded'
Code:
<script type="text/javascript">
<!--
function photo(x)
{
var y=document.getElementByName(x).value
if(document.getElementByName(x).value == "Picture"){
document.getElementByName("reason2").value == "When a real picture gets uploaded";
}
}
//-->
</script>
<form action="forum.php?step=banuser" method="POST">
<b><u>Ban Player</u></b><br /><br />
<b>ID: <input name="id" value="' . $id .'" /> Reason:
<select name="reason" OnChange="photo(this.name)">
<option value="Spamming">Spamming</option>
<option value="Picture" OnClick="document.getElementByName(\'reason2\').value=\'When Real Photo is Uploaded\'">Picture</option>
<option value="Excessive Linking to Other Sites">Excessive Linking to Other Sites</option>
<option value="Racism">Racism</option>
<option value="Foul Language">Foul Language</option>
<option value="Disrespect">Disrespect</option>
</select>
Unban: <input type="text" name="reason2" value="MM/DD/YY" /></b>
<input type="submit" name="submit" value="Ban!">
</form>
|