javascript - jQuery I cant get both zip lists to show up on map -


here code:

jquery(document).ready(function() {    var nhzips="77014, 77015, 77032, 77060, 77064, 77067, 77065, 77066, 77068, 77069, 77070, 77073, 77090, 77301, 77302, 77304, 77338, 77354, 77355, 77362, 77373, 77375, 77377, 77379, 77380, 77381, 77382, 77384, 77385, 77386, 77388, 77389";    var nehzips="77032, 77044, 77336, 77339, 77345, 77346, 77347, 77357, 77365, 77396";    var acworthzips="30101, 30102"    $("#nhzips").html(nhzips);   $("#acworthzips").html(acworthzips)    var searcharr = [[nhzips+", "+nehzips,"north-houston"]];    $( "#zipform" ).submit(function() {     var inarray=false     var searchval=$("input.search-box").val();     (var i=0;i<searcharr.length;i++){         searchstr=", "+searcharr[i][0]+",";         gotoloc=searcharr[i][1];         if(searchstr.indexof(", "+searchval+",")>=0){             $( "a#pric-loc-btn" ).attr("href", "http://hlmaids.com/get-a-price/get-a-price/"+gotoloc);             inarray=true;             break;         }     }     if(inarray){         $( "#search-answer" ).show( 0 );         $( "#search-answer-fail" ).hide( 0 );         var value = $("input.search-box").val();         $( "span#zip-success" ).text( value );     }     else {         $( "#search-answer-fail" ).show( 0 );         $( "#search-answer" ).hide( 0 );         var value = $("input.search-box").val();         $( "span#zip-fail" ).text( value );     };      return false;   }); }); 

http://hlmaids.com/get-a-price/

is page displaying on. right can nhzips show service in area.

i tried changing code

var searcharr = [[nhzips+", "+nehzips,"north-houston"]]; 

to

var searcharr = [[acworthzips+", "acworth"]&&[nhzips+", "+nehzips,"north-houston"]]; 

but shows 1 , not other list of zips.

var searcharr = [[acworthzips+", "acworth"]&&[nhzips+", "+nehzips,"north-houston"]]; 

needs changed

var searcharr = [[acworthzips+", "acworth"],[nhzips+", "+nehzips,"north-houston"]]; 

Comments

Popular posts from this blog

python - pip install -U PySide error -

arrays - C++ error: a brace-enclosed initializer is not allowed here before ‘{’ token -

cytoscape.js - How to add nodes to Dagre layout with Cytoscape -