I'm new to javascript, but I'm getting an "Unexpected Token ILLEGAL" error with this line of code:
switch (city) {
case "london":
var newdiv = document.createElement('<div id="london" class="option-area"><label class="city">From London to…?</label>
<select class="city">
<option></option>
<option>1</option>
<option>2</option>
<option>3</option>
</select><br /></div>');
document.all.bookingform.appendChild(newdiv);
break;
}
It's probably a very dumb mistake, but I've tried for hours to get this block working. Please help!