I've searched a couple of questions on this site but couldn't find a helpfull one, the problem which I have is:
I have 2 radio form boxes, which are called 'Youtube' and 'Picture',I want this: When I click on the radio box of Youtube a text form shows up, I can't fix this and thats why I hope you do guys! thank you for you time!
my Javascript:
<SCRIPT LANGUAGE="JavaScript">
$("input[type='radio']").change(function(){
if($(this).val()=="youtube")
if($(this).val()=="pic")
{
$("#youtube").show();
}
else
{
$("#youtube").hide();
}
});
</script>
My form:
echo '
<form action="post.php" method="post">
title: <input name="title" type="text" id="title"><br />';
//Picture link: <input name="pic" type="text" SIZE="80" id="pic"><br />
//Youtube link: <input name="youtube" type="text" SIZE="80" id="youtube"><br />';
echo '
<input type="radio" name="youtube" value="youtube">Youtube <input style="display: none;" type="text" name="youtube" id="youtube"/> | <input type="radio" name="pic" value="pic">Picture <input style="display: none;" type="text" name="pic" id="pic"/><br />
Category game:
<select name="cat">';
while($row=mysql_fetch_array($query2)){
echo '
<option value="'.$row["nameID"].'">'.$row["name"].'</option> // here is the problem
'; }
echo '
</select>
<input type="submit" name="submit" value="submit">
</form>
';