|
<html>
<head>
<script type="text/javascript">
function showprice(n, p) {
document.getElementById('textcontainer'+n).innerHT ML='$'+p;
eval('document.paypal'+n+'.amount').value=p;
}
</script>
</head>
<body>
<form name="paypal1" target="paypal" action="https://www.paypal.com/cgi-bin/webscr" method="post">
<span id="textcontainer1">Select an item</span>
<select name="item_name">
<option onclick="showprice(1,'10')" value="Item one">Item one</option>
<option onclick="showprice(1,'20')" value="Item two">Item two</option>
<option onclick="showprice(1,'30')" value="Item three">Item three</option>
</select>
<input type="text" name="amount" value="" />
</form>
</body>
</html>
For additional forms, change the numbers in bold to 2, then 3 etc.
The numbers in inverted commas (in this case '10', '20', '30') are the prices.
Rufo.
|