Hi,
I’m trying to insert the url from an onlick event in the the radio buttonsto the href link but it not working. Here’s I have so far.
<input type="radio" name="orderID" value="1" onclick="javascript:document.getElementById('editBTN').href='forms/editForm.cfm?orderID ='&this.value">
<input type="radio" name=" orderID " value="2" onclick="javascript:document.getElementById('editBTN').href='forms/editForm.cfm?orderID ='&this.value">
Etc…
The link below href should change depending on which radio button is clicked.
<a href="" id="editBTN"> Edit Order</a>
The above script returns the current url with “localhost/myApp/0” at the end. If I remove this ('forms/editForm.cfm?orderID='&) from the radio button it correctly return the orderId.
I would like this result localhost/myApp/forms/editForm.cfm?orderID=1. Any suggestion would be greatly appreciated.