Hi all

I am not a javascript programmer.

I am trying to use the jquery $.post function to send data to a php script, but Im getting stumped on how to pass a javascript variable to the data section of said function.

PHP Code:
  <div class="qty">Qty: 
   <select id="qty<?php echo $prodid?>" name="qty">
    <option value="1">1</option>
    <option value="2">2</option>
    <option value="3">3</option>
    <option value="4">4</option>
    <option value="5">5</option>
    <option value="6">6</option>
    <option value="7">7</option>
    <option value="8">8</option>
    <option value="9">9</option>
    <option value="10">10</option>
  <div class="basket">
   <a href="#nogo" onClick="qtyordered=document.getElementById('qty<?php echo $prodid?>').value; $.post('basket.php',{op:'add',prod:'<?php echo $prodid?>',qty:qtyordered})">
<img src="images/siteimages/basket.png" /></a>
As you can see the onclick reads the value of the associated select box which I then need transfered to the qty element of the data.