Hi, i have this part of my code that is put through a while loop, in other words it basically displays a lot of different products for an online shop, what i want is that when the add button on one of the products is clicked, it takes the quantity input associated with the product and creates a javascript variable out of it. Thats all i need. Once i can do this i already have the ajax required to complete the task, but i have spent the last day and a half trying to figure it out, to no avail.

Here is the form, that in turn hold one product, remember there are many other products.

<form class="form" action="false">    
      <div class="supp_bro_mat_wrap">            
              <input name="supp_bro_qty_input" class="supp_bro_qty_input" type="text" />

      </div><!---end supp_bro_input_wrap--->
      <input name="s" type="submit" class="supp_bro_add_to_cart" />          
</form>

Thanks for your help

creates a javascript variable out of it

I am not sure how you can 'create' a variable dynamically. I can think of having a predefined array, when user selects any product its quantity get added add the next index of array. Does it work for your purpose?