Code:
if(document.getElementById("Payment").value == "Paypal")
will always be false as long as this exists:
Code:
<input type="RADIO" name="Payment" id="Payment" value="Mail">
and is the only element (or in some browsers, simply the first element) on the page with an id of "Payment", as it appears to be in your example. Regardless, technically speaking, there may only be one element per page with a given id. Multiple elements on a page that share an ID will either cause an error or default to the first one one parsed by javascript (depends upon the browser).
If on the other hand your markup looked like this (addition highlighted):
Code:
<input type="RADIO" name="Payment" id="Payment" value="Mail"><b>Pay by mail:</b>
<p><input type="RADIO" name="Payment" id="Paypal" value="Paypal"><b>Pay with Paypal:</b>
Then this code would (assuming there are no other problems/conflicts) work:
Code:
if(document.getElementById("Paypal").checked)
document.getElementById("redirect").value="http://www.paypal.com";
Bookmarks