title: Radio button selected shows a text box
body: <p>I've searched a couple of questions on this site but couldn't find a helpfull one, the problem which I have is:</p>
  
  <p>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!</p>
  
  <p>my Javascript:</p>
  
  <pre><code>        &lt;SCRIPT LANGUAGE="JavaScript"&gt;
      $("input[type='radio']").change(function(){
  
     if($(this).val()=="youtube")
     if($(this).val()=="pic")
     {
        $("#youtube").show();
     }
     else
     {
         $("#youtube").hide(); 
     }
  
      });
      &lt;/script&gt;
  </code></pre>
  
  <p>My form:</p>
  
  <pre><code> echo '
     &lt;form action="post.php" method="post"&gt;
      title: &lt;input name="title" type="text" id="title"&gt;&lt;br /&gt;';
  
      //Picture link: &lt;input name="pic" type="text" SIZE="80" id="pic"&gt;&lt;br /&gt;
      //Youtube link: &lt;input name="youtube" type="text" SIZE="80" id="youtube"&gt;&lt;br /&gt;';
      echo '
      &lt;input type="radio" name="youtube" value="youtube"&gt;Youtube &lt;input style="display: none;" type="text" name="youtube" id="youtube"/&gt; | &lt;input type="radio" name="pic" value="pic"&gt;Picture &lt;input style="display: none;" type="text" name="pic" id="pic"/&gt;&lt;br /&gt;
      Category game: 
       &lt;select name="cat"&gt;';
        while($row=mysql_fetch_array($query2)){
  echo '
         &lt;option value="'.$row["nameID"].'"&gt;'.$row["name"].'&lt;/option&gt; // here is the problem
          '; }
        echo '
       &lt;/select&gt;
      &lt;input type="submit" name="submit" value="submit"&gt;
     &lt;/form&gt;
   ';
  </code></pre>