Hi all,
Unfortunately I can't post all of the code because the page in question is still in development and when live will be IP restricted but I'm hoping the code I'm about to provide will be sufficient.

Given the following table cell:
<td>
<input class="SearchProdID" type="hidden" value="460" name="ProdID"/>
<input class="SearchQty" type="text" value="1" size="2" name="qty"/>
<input class="cartadd" type="button" value="+" name="searchcartadd"/>
</td>

The following JavaScript works in FF2 and IE7 but not in IE6:

$(".cartadd").click(function() {      
        // GET SIBLING PRODUCT IDS
        IDBox  = $(this);               
        ProdID = $(this).siblings(".SearchProdID").val();             
        Qty    = $(this).siblings(".SearchQty").val();

        alert("Here");

        // MORE CODE....
}

In FF2 and IE7 "Here" is alerted and the entire function (which later posts these variables via AJAX) runs perfectly. In IE6 I don't get the alert. If I alert IDBox right after the line where it's set, I get [object Object] which I believe is correct, but as soon as it hits the next lines involving siblings, it just stops dead - no error, no warning, nothing.

Can anyone shed any light on a cause or solution? Much appreciated if you can. :)

Regards,
Michael Price

Reply via email to