I have a html form with a dropdown list of car models and a blank frame below that. I'd like to display a url related to the selected car in the frame when the submit button is pushed. I have it working and displays the current cars value in the frame, but I don't know how to insert and have JS return a URL value.
the JS goes like this: (and it may be completely wrong as I'm new to this stuff...)
function carFormSelect (form) {
var Car = form.selCar.value;
if (Car == 'Camry'){
document.querySelector('.carSelected').innerHTML = (Car);
}
HTML like this:
<select id="selCar" name="selCar">
<option value="Camry">Camry</option>
<option value="Corolla">Corolla</option>
</select>
I'm assuming I need the URL to be placed where (Car) is. I tried putting the url in quotes but didn't work. Any help would be greatly appreciated.
Thanks!