Select to view content in your preferred language

no dropdown arrow in combo box

8133
25
Jump to solution
08-06-2012 08:24 AM
deleted-user-ugCMpXci8bn5
New Contributor III
Hello, I hope this is a simple problem I am overlooking...

I am trying to create a combo box with hardcoded values.  What I get is a text box that does not have an arrow or drop-down functionality (the auto complete does function).

Here is what I have in the HTML (based on examples from ESRI):

            <select id="boroughSelect" dojotype="dijit.form.ComboBox"
                autoComplete="true"
                forceValidOption="false"
                onchange="executeMenuQuery(this)">

                <option>Manhattan</option>
                <option>Brooklyn</option>
                <option>Bronx</option>
                <option>Staten Island</option>
                <option>Queens</option>

            </select>


This seems like it should be pretty easy, can someone tell me what I am missing?
Thanks, Jason F.
0 Kudos
25 Replies
KellyHutchins
Esri Frequent Contributor
Are you running this from  your file server (file://) or from the web server (http://localhost). In order to test it you'll need to run the test from your web server.
0 Kudos
deleted-user-ugCMpXci8bn5
New Contributor III
So are you saying I cannot run the examples given by ESRI using Aptana or Notepad++ unless through a web server?

In either case, I have been having trouble using 3.1 running from both localhost (through MVC) and running as a file from an editor.  For the most part 2.1 has worked, but now I am having trouble using the locator class (as given in the ESRI example http://help.arcgis.com/en/webapi/javascript/arcgis/help/jssamples_start.htm).
0 Kudos
KellyHutchins
Esri Frequent Contributor
Aptana has a built-in web server that may allow you to view some samples without installing your own web server but it's a good practice to setup a more robust web server that you can use to test your code and the samples.

What type of issues are you having with the locator sample?


So are you saying I cannot run the examples given by ESRI using Aptana or Notepad++ unless through a web server?

In either case, I have been having trouble using 3.1 running from both localhost (through MVC) and running as a file from an editor.  For the most part 2.1 has worked, but now I am having trouble using the locator class (as given in the ESRI example http://help.arcgis.com/en/webapi/javascript/arcgis/help/jssamples_start.htm).
0 Kudos
deleted-user-ugCMpXci8bn5
New Contributor III
I am trying to implement a locator similar to the one used in the example linked above (although I hope to use it with street intersections for input).  The locator service does not work with 2.1, but it does seem to work with 3.1.  I am a bit confused by the example; the locator noted in the explanation, TA_Address_NA_10  (and referred to by the parameters in the code) is not the same as the url assigned to the 'locator' variable (WorldLocator). 
In any case, the code works for me when I switch to 3.1 but not in 2.1.  The problem is that many of my other functions, such as the navigation bar, my infoWindow which appears when clicking on features, and the dropdown menu created by a query, do not work when I switch to 3.1 (as noted above).

Pre-built in the MVC setup (on layout.cshtml) there is this line:

<script src="@Url.Content("~/Scripts/jquery-1.7.2.min.js")" type="text/javascript"></script>

Is it possible that these problems may be related to the MVC framework?  I am new to MVC and Javascript (as you may have guessed).
Thanks again, j
0 Kudos
deleted-user-ugCMpXci8bn5
New Contributor III
sorry I meant to include this line:

<script src="@Url.Content("~/Scripts/modernizr-1.7.min.js")" type="text/javascript"></script>
0 Kudos
MarcoWagemakers
Occasional Contributor
Hi,

I had the same problem by customizing the ArcGIS Online Basicviewer...

The issue is the code in the Layout.css:

/*change the default arrow used by the basemap dropdown button from black to gray*/
.claro .dijitArrowButtonInner {
  background-image: url("../images/buttonArrows.png");
  background-position:-152px 53%;
}
/*Use a white arrow for the dropdown*/
.claro .dijitArrowButtonInner {
  background-image: url("../images/buttonArrows.png");
  background-position:-53px 53% !important;
}

Marco
0 Kudos