html - javascript return URL onClick -


i have html form dropdown list of car models , blank frame below that. i'd display url related selected car in frame when submit button pushed. have working , displays current cars value in frame, don't know how insert , have js return url value.

the js goes this: (and may wrong i'm new stuff...)

function carformselect (form) { var car = form.selcar.value; if (car == 'camry'){ document.queryselector('.carselected').innerhtml = (car); } 

html this:

<select id="selcar" name="selcar">                     <option value="camry">camry</option>                     <option value="corolla">corolla</option> </select> 

i'm assuming need url placed (car) is. tried putting url in quotes didn't work. appreciated.

thanks!

you can using jquery/ajax request.

you need value when user clicks on select element , send page have iframe treated src want (in case car site)


Comments

Popular posts from this blog

html - Difficulties with background-image property -

visual studio code - What does the isShellCommand property actually do and how should you use it? -

ios - Segue not passing data between ViewControllers -