At http://www.poliscarhire.com/test/test-car-menu-page.php
I used onchange [drop down "location menues") but function do NOT called ONCHANGE the drop down where the error ?
head:
Code:<script language="javascript" type="text/javascript"> <!-- function showRow1() { alert("called showRow1()"); alert(document.getElementById('pickUpLocation').selectedIndex); if (document.getElementById('pickUpLocation').selectedIndex==2 or document.getElementById('pickUpLocation').selectedIndex==3) { // "Other Accomodation" "Hotel in Cyprus" dropOffLocation pickUpLocation document.getElementById('accomodation1').style.display = ''; } else { document.getElementById('accomodation1').style.display = 'none'; } } document.getElementById('accomodation1').style.display = 'none'; document.getElementById('accomodation2').style.display = 'none'; function showRow2() { if (document.getElementById('dropOffLocation').value=="Other Accomodation" or document.getElementById('dropOffLocation').value=="Hotel in Cyprus") { // dropOffLocation pickUpLocation document.getElementById('accomodation2').style.display = ''; } else { document.getElementById('accomodation2').style.display = 'none'; } } //--> </script>Code:<select id="select2" name="pickUpLocation" tabindex="50" style="font-size: 11px" onchange="showRow1();" > <option>Paphos Airport</option> <option>Larnaca Airport</option> <option>Hotel in Cyprus</option> <option>Other Accomodation</option> <option selected="selected">Polis Office</option> <option>Latchi Office</option> </select>Code:<script language="JavaScript" type="text/javascript"> document.getElementById('accomodation1').style.display = 'none'; document.getElementById('accomodation2').style.display = 'none'; </script>


Reply With Quote


Bookmarks