[OpenLayers-Users] dynamic url

Julien-Samuel Lacroix jlacroix at mapgears.com
Tue Dec 2 09:56:05 EST 2008


Hi,

What is not working? Everything or just a small part of your code. When 
things work in Firefox and not in IE, it usually mean there's a small 
JavaScript error. Try putting JavaScript alert() every 5 lines or so. At 
some point an alert won't pop up. This is where your bug is.

Other may have better way to debug in IE though.

Try putting a "var " (without the quote) in front of the parameters 
variable.
I don't know if IE support empty hash like {}, but I would think so.

Julien

Lehtonen, Mika wrote:
> Hi,
> this may be a more of a JavaScript question, but I'll give it a try on 
> this list anyway.
> 
> I have an OpenLayers application where user can upload his/her own 
> shp-file onto server (FeatureServer). Also user can "download" them back 
> as an Openlayers wfs-layer. So the url in that wfs layer definition is 
> dynamic:
> 
>     parameters = dataid + "?format=wfs&userid=" + userid + "&sposti=" + 
> sposti + "&dataid=" + dataid;
>     fserver = new OpenLayers.Layer.WFS("Uploaded SHP", 
> "http://mydomain.com:8080/cgi-bin/featureserver-1.12/featureserver.cgi/"+ 
> parameters,{},{extractAttributes: false, projection: new 
> OpenLayers.Projection("EPSG:2393"), styleMap: shpStyle});
> 
> dataid, userid and sposti are parameters which user have to fill in 
> before uploading the shp-file. Afterwards, he/she can access the 
> uploaded shp-file with those parameters through wfs. This works in 
> Firefox but not in IE. How come? Any ideas?
> 
> 
> - mika -
> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users
> 

-- 
Julien-Samuel Lacroix
Mapgears
http://www.mapgears.com/



More information about the Users mailing list