Soldato
- Joined
- 1 Sep 2005
- Posts
- 10,001
- Location
- Scottish Highlands
Im trying to sort out the sales section of my website, and want to be able to select a size of print from a dropdown box (sorted that), but then depending on the size selected, I want the price to change accordingly. How do I do that? At the moment my code is;
Edit; Oh and why is the paypal button not XHTML strict valid!?! It seems to need the 'target' attribute which is no longer valid. Boo Paypal, boo!
Code:
<form target="paypal" action="https://www.paypal.com/cgi-bin/webscr" method="post">
<table>
<tr>
<td>
<input type="hidden" name="on0" value="Size" />
</td>
<td>
<select name="os0">
<option value="A4">A4</option>
<option value="A3">A3</option>
<option value="A2">A2</option>
<option value="20"x16"">20"x16"</option>
<option value="30"x20"">30"x20"</option>
</select>
</td>
</tr>
</table>
<input type="image" src="https://www.paypal.com/en_GB/i/btn/x-click-but10.gif" name="submit" alt="PayPal - The safer, easier way to pay online." />
<img alt="" src="https://www.paypal.com/en_GB/i/scr/pixel.gif" width="1" height="1" />
<input type="hidden" name="add" value="1" />
<input type="hidden" name="cmd" value="_cart" />
<input type="hidden" name="business" value="[email protected]" />
<input type="hidden" name="item_name" value="Print of <IMAGE_TITLE>" />
<input type="hidden" name="amount" value="25.00" />
<input type="hidden" name="shipping" value="5.00" />
<input type="hidden" name="no_shipping" value="2" />
<input type="hidden" name="return" value="http://www.afowler.co.uk/gallery/thankyou.html" />
<input type="hidden" name="currency_code" value="GBP" />
<input type="hidden" name="lc" value="GB" />
<input type="hidden" name="bn" value="PP-ShopCartBF" />
</form>
Edit; Oh and why is the paypal button not XHTML strict valid!?! It seems to need the 'target' attribute which is no longer valid. Boo Paypal, boo!