empicard

using a variable set from a <form>

Discussion created by empicard on Jan 2, 2012
Latest reply on Jan 3, 2012 by jeff.pace
building from the example here:
http://help.arcgis.com/en/webapi/javascript/arcgis/demos/find/find_map_datagrid.html

I have a dropdown menu, to create a variable.  My intention is to be able to search on more than one feature class/"find task"

Here is the code from within <body> for the dropdown menu:

       <div id="rightPane" dojotype="dijit.layout.ContentPane" region="right">
          <form>
              Search by :
              <select id="myList" onchange="searchQual()">
                <option></option>
                <option>District</option>
                <option>Division</option>  
              </select> 
              <p><input type="text" id="searchQualVal" size="0"></p> 
          </form>
   Search Value: <input type="text" id="searchVal" size="10" value="1068"/>
          <button data-dojo-type="dijit.form.Button"  data-dojo-props='onClick:function(){ doFindFunc();}, value:"Search"'>
             Search
          </button>


and im trying to use the values "searchQual" and "searchQualVal" to here:
      function doFindFunc() {
        //Set the search text to the value in the box 
        findParams.searchText = dojo.byId("searchVal").value;
        //it never gets into this switch
        switch (searchQualVal){  
        case "District":
          findDistrict.execute(findParams,showResults);
          break;
        case "Division":
          findDivision.execute(findParams,showResults);
          break;
        };
      };
      


please help!
Thank you.

Outcomes