Migrating to 3.2

806
3
Jump to solution
11-28-2012 11:46 AM
SamirGambhir
Occasional Contributor III
Hello,
I am trying to migrate my application from v=2.8 to v=3.2, and experiencing the following application behavior (read strange):

1. I keep getting the error "XMLHttpRequest cannot load http://server.arcgisonline.com/ArcGIS/rest/info?f=json. Origin http://localhost:8080 is not allowed by Access-Control-Allow-Origin.". I followed a few forum threads and understood that this can be ignored.

2. My init() function is supposed to populate my combo boxes with data from the shapefile. My combobox shows up with the default value that I set and has no other value. Any attempt to pull the list down gives an error "Uncaught TypeError: Object [object Object] has no method 'query' ".

3. My div elements do not follow my css completely. Some elements have a background color, text goes out of the button confines, and some elements show up fine.

4. The query function is performing well and giving me the desired result which means that my data folders are properly registered.

I am not sure what is going on and I am also not sure what information to share on this forum to get a resolution to this problem. I am using ArcGIS Server 10.1 with JavaScript API.

Thanks
Samir
0 Kudos
1 Solution

Accepted Solutions
derekswingley1
Frequent Contributor
#1:  as you noted, you can ignore those errors. For completeness, there's background in a previous forum post.

#2:  you might be trying to access a widget's store directly. Try getting a reference to the store, then running your query on that.

#3 sounds like an app specific CSS issue. If you can post a repro, we might be able to help.

#4 sounds like it's not something you need help with but rather that things are working as expected.

View solution in original post

0 Kudos
3 Replies
MattO_Hara
New Contributor
It's hard to deduce these types of problems without seeing the source or an example.

Could you post the code for how you are getting information about the shapefile?

You mentioned style issues and one difference between 2.8 and 3.2 is you now need to include an additional css file. Are you inlcuding the css file below on your page?

<link rel="stylesheet" type="text/css" href="http://serverapi.arcgisonline.com/jsapi/arcgis/3.2/js/esri/css/esri.css" />
0 Kudos
derekswingley1
Frequent Contributor
#1:  as you noted, you can ignore those errors. For completeness, there's background in a previous forum post.

#2:  you might be trying to access a widget's store directly. Try getting a reference to the store, then running your query on that.

#3 sounds like an app specific CSS issue. If you can post a repro, we might be able to help.

#4 sounds like it's not something you need help with but rather that things are working as expected.
0 Kudos
SamirGambhir
Occasional Contributor III
#1:  as you noted, you can ignore those errors. For completeness, there's background in a previous forum post.

#2:  you might be trying to access a widget's store directly. Try getting a reference to the store, then running your query on that.

#3 sounds like an app specific CSS issue. If you can post a repro, we might be able to help.

#4 sounds like it's not something you need help with but rather that things are working as expected.


Thanks Matt and Derek,
I was able to resolve these issues and the app is working fine now. I thought these issues were specific to JS 3.2 and dojo 1.7. Well, at least one issue was related to dojo 1.7:
#1. I ignored the error
#2. I had to change 'dijit.byId("abc").store = store' to 'dijit.byId("abc").set("store", store)'
#3. I had a leftover class attribute from my previous code. Removing that attribute made my app work fine
#4. This was to suggest that since query function is working well, the issue could be with the migration.
Thanks for your help
Samir
0 Kudos