I have the following condensed form
Correct code would be:
var oForm = document.forms["thecars"];
var oDDL = oForm.elements["cars"];
var selectedCar = oDDL.value;
You can't get reference to the form by just using its name.
Assign an ID to your select
element:
<select name="cars" id="cars">
And you can get the value like this:
document.getElementById('cars').value
You are missing an =
. Change this
<form name "thecars">
To this
<form name="thecars">