[mapguide-users] RE: Setting Active Selection Using Web API
Jackie Ng
jackie.ng at aecsystems.com.au
Tue Jul 3 00:11:33 EDT 2007
Hi Mark,
It sounds like a cross-scripting problem. Are you sure that your javascript
is running under the same hostname? Do you have any references to localhost
in your javascript?
- Jackie
Mark Pendergraft wrote:
>
> Okay, I have done more testing.... And here is something weird.
>
>
>
> When I open Autodesk MapGuide Studio 2007, and goto my map layout. If I
> launch the map from either one of the GO buttons (which launch AJAX or
> DWF) the code works fine. It selects the parcel, and it's properties
> show up in the pane.... It doesn't work when I'm loading the map through
> my own page.... which is almost identical to the dotnetviewersample. So
> I don't quite understand what the problem is here.
>
>
>
> Why does it work when launched with the entire URL:
>
> http://mga111/mapguide/mapviewerajax/?WEBLAYOUT=Library%3a%2f%2fKroll%2f
> Layout%2fMGAJobMapLayout.WebLayout&LOCALE=en
>
>
>
> but not when I use:
>
> http://mga111/mapguide/mga apps/test.aspx
> <http://mga111/mapguide/mga%20apps/test.aspx>
>
>
>
> they both reference the same taskpane startup page.
>
>
>
> From: mapguide-users-bounces at lists.osgeo.org
> [mailto:mapguide-users-bounces at lists.osgeo.org] On Behalf Of Mark
> Pendergraft
> Sent: Monday, July 02, 2007 2:55 PM
> To: mapguide-users at lists.osgeo.org
> Subject: [mapguide-users] Setting Active Selection Using Web API
>
>
>
> I am trying to set the active selection of the map using the web API.
> I'm using the MGOS 1.2 and writing in VB using VS 2005 Pro
>
>
>
> My code seems to run just fine (the vb portion). When I enable script
> debugging for internet explorer the javascript code below returns an
> error stating "Permission Denied"
>
>
>
> -----------javascript code creating error--------------
>
>
>
> function OnPageLoad()
>
> {
>
> selectionXml = '<% =XmlSelection %>';
>
> parent.parent.SetSelectionXML(selectionXml);
>
> parent.parent.refresh();
>
> }
>
>
>
> -----------javascript code creating error--------------
>
>
>
> The parent.parent.setselectionxml(selectionxml) line is where I get the
> error.
>
>
>
> The weird part is, if I disable script debugging and let it run the map
> says "0 features selected", the properties window shows nothing, and no
> selection shows up on screen. But if I refresh the map, the selection
> does show up, but the properties window and map still show nothing.
>
>
>
> I'm desperately trying to make this work!!! I want people to be able to
> search by parcel numbers on my map, and I want the map to zoom and
> select a parcel when they enter the parcel_id number. However, it all
> hangs on me being able to select items on the map first.
>
>
>
> -Mark Pendergraft.
>
>
>
>
> _______________________________________________
> mapguide-users mailing list
> mapguide-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapguide-users
>
>
--
View this message in context: http://www.nabble.com/Setting-Active-Selection-Using-Web-API-tf4015139s16610.html#a11405925
Sent from the MapGuide Users mailing list archive at Nabble.com.
More information about the mapguide-users
mailing list