I have a page with lots of paypal add to cart buttons. For each of these buttons I want to have two radio buttons that will update the value of a span to reflect the price of the selected option. So I have:
<input type="hidden" name="currency_code" value="GBP" /><input type="image" name="submit" border="0" src="images/buy-now.gif" alt="PayPal - The safer, easier way to pay online" />
</form>
<span cass="price">£6.49</span>
As you can see the price span is merely for information purposes and doesn't have anything to do with how the button communicates with Paypal.
I have found a number of different scripts to update the value of the price span according to the radio buttton selected, but I need something that will work with the same script and without having to specify a different class or id for the price span on each button on the page. Is this possible?