‘dest1.php’ is a PHP script which includes JavaScript to validate a form client side.
Using a wildcard search method the script queries the database for a destination.
Once ‘dest1.php’ is displayed becuase some journeys may incur an additional surcharge the user has to make a selection from either a YES or NO radio button option displayed within a HTML form. The JavaScript code on the page is meant to check whether a selection has been made so the customer will be quoted the correct amount.
If only one result is displayed the client side validation works fine, however, if more than one result is displayed it does not work at all.
I know it is probably due to the fact that I have referred to the form using the DOM method but I am not sure how to correct it, can anyone help?
I have included the script dest1.php as an attachment,