JavaScript Html and javascript <select> tags with filtering html javascript select option,html javascript select onchange,html javascript

I will try to be as specific as I can.

So I need to create a selector that filters the options.

I have:

  1. types of cars
  2. The places where you can drive those cars.

So for example you would select > Ferrari > then the correct areas on the second select tag show up

I.e. Select > Ferrari = London, Cambridge, Devon, New hampshire

  Select > Lamborghini = London, Bertshire, Oakwood,

And then finally

they choose (Ferrari + Cambridge) and then press "go" and jump to the final link that will take them to the right page.

My code is:

    <script type='text/javascript' src='http://code.jquery.com/jquery-1.6.js'></script>

<script type='text/javascript'>//<![CDATA[ 




$('#filter-regions').on('click', function() {
    var pilotage-carFilter = $('#pilotage-car').text();
    var itemFilter = $('#items').text(); 

    console.log('pilotage-carFilter: ' + pilotage-carFilter);
    console.log('itemFilter : ' + itemFilter);
    console.log('Applying filter now...');

    featureList.filter(function(item) {
        console.log('Running filter() on item: ('+item+')');
        console.log('item.values().pilotage-car: ' + item.values().pilotage-car);
        console.log('item.values().item: ' + item.values().item);

        return 
            (pilotage-carFilter==='Ferrari' || item.values().pilotage-car === pilotage-carFilter) 
            && (itemFilter==='All items' || item.values().item === itemFilter);
    });

    return false;
});



//]]>  

</script>


</head>

<body>

<form id="filter">
<select id="pilotage-car" name="pilotage-car" size="1">
<option value="http://www.coolcadeau.fr/Stage-de-pilotage-Ferrari-BN-5iZ5.aspx?SqNo=5iZ5&cm_sp=LHN-_-Voiture-_-Ferrari&cm_re=Ferrari-_-Voiture-_-LHN">Ferrari</option>
<option value="Porsche">Porsche</option>
<option value="Lamborghini" selected>Lamborghini</option>
<option value="Mustang">Mustang</option>
<option value="Audi" selected>Audi</option>
<option value="Multivolants">Multivolants</option>
<option value="Rallye">Rallye</option>
<option value="Subaru">Subaru</option>
<option value="Karting">Karting</option>
<option value="4x4">4x4</option>
<option value="Moto">Moto</option>
<option value="Quad">Quad</option>
<option value="Buggy">Buggy</option>
<option value="Renault Sport">Renault Sport</option>
<option value="Prototype">Prototype</option>
<option value="Chevrolet">Chevrolet</option>
<option value="Corvette">Corvette</option>
</select>

<select id="items" name="items" size="1">
<option value="http://www.coolcadeau.fr/Stage-de-pilotage-Ferrari-Alsace-BN-5iZ5Z1z13skq.aspx?SqNo=5iZ5Z1z13skq&cm_sp=LHN-_-Region-_-Alsace&cm_re=Alsace-_-Region">A l'&eacute;tranger</option>
<option value="Alsace">Alsace</option>
<option value="Aquitaine" selected>Aquitaine</option>
<option value="Auvergne">Auvergne</option>
<option value="Basse-Normandie" selected>Basse-Normandie</option>
<option value="Bourgogne">Bourgogne</option>
<option value="Bretagne">Bretagne</option>
<option value="Centre">Centre</option>
<option value="Champagne-Ardenne">Champagne-Ardenne</option>
<option value="Franche-Comt&eacute;">Franche-Comt&eacute;</option>
<option value="Haute-Normandie">Haute-Normandie</option>
<option value="Ile-de-France">Ile-de-France</option>
<option value="Languedoc-Roussillon">Languedoc-Roussillon</option>
<option value="Limousin">Limousin</option>
<option value="Lorraine">Lorraine</option>
<option value="Midi-Pyr&eacute;n&eacute;es">Midi-Pyr&eacute;n&eacute;es</option>
<option value="Nord-Pas-de-Calais">Nord-Pas-de-Calais</option>
<option value="Pays de la Loire">Pays de la Loire</option>
<option value="Picardie">Picardie</option>
<option value="Poitou-Charentes">Poitou-Charentes</option>
<option value="Provence-Alpes-C&ocirc;te d'Azur">Provence-Alpes-C&ocirc;te d'Azur</option>
<option value="Rh&ocirc;ne-Alpes">Rh&ocirc;ne-Alpes</option>
</select>




<input id="go-button" type="button" name="test" value="Go"/>
</form>

Im really not sure about javascript at all.

How could I, and/or what is the best way I could achieve this? Are there any examples out there?

EDIT: I found something like this http://jsfiddle.net/dtAgX/1/ But i need a sumbit button that will link to the right page based on selection.

Thanks in advance

Answer:1

$(document).ready(function(){ var email_default = "Enter your email address..."; $("input[type="email"]").attr("value", email_default); }); Javascript console comes up with this: Uncaught ...

$(document).ready(function(){ var email_default = "Enter your email address..."; $("input[type="email"]").attr("value", email_default); }); Javascript console comes up with this: Uncaught ...

  1. uncaught syntaxerror missing initializer in const declaration
  2. uncaught syntaxerror missing )
  3. uncaught syntaxerror missing initializer in destructuring declaration
  4. uncaught syntaxerror missing in template expression

I don't understand why I cannot get the data I POST form with Angular.js Express. Angular Part : $http.post(baseURL+"/search", data).success(function(data, status) { $scope.results = data; ...

I don't understand why I cannot get the data I POST form with Angular.js Express. Angular Part : $http.post(baseURL+"/search", data).success(function(data, status) { $scope.results = data; ...

  1. sending data from arduino to raspberry pi
  2. sending data from child to parent react
  3. sending data from arduino to excel
  4. sending data from arduino to computer
  5. sending data from python to arduino
  6. sending data from raspberry pi to web server
  7. sending data from client to server
  8. sending data from activity to fragment
  9. sending data from python to html
  10. sending data from arduino to processing
  11. sending data from raspberry pi to pc
  12. sending data from microcontroller to pc
  13. sending data from javascript to python
  14. sending data from matlab to arduino
  15. sending data from arduino to esp8266
  16. sending data from android to iphone
  17. sending data from splunk to kafka
  18. sending data from plc to sql server
  19. sending data from one esp8266 to another
  20. sending data from arduino to nodemcu

I am trying to replace string words which are enclosed in $ with values of JSON. For example: I have json. $scope.data = { name: "Some Name", user: "User Name", designation: "Designation", ...

I am trying to replace string words which are enclosed in $ with values of JSON. For example: I have json. $scope.data = { name: "Some Name", user: "User Name", designation: "Designation", ...

  1. replacing part of string python
  2. replacing part of string in java
  3. replacing part of string c++
  4. replacing part of string in sql
  5. replacing part of a string
  6. replacing part of a string r
  7. replacing part of a string in excel
  8. replacing part of a string in sql server

How to unescape string escaped using StringEscapeUtils in front end. Thank you PS: I use EXT-js3.4 & Jsp.

How to unescape string escaped using StringEscapeUtils in front end. Thank you PS: I use EXT-js3.4 & Jsp.