[mapguide-users] Pass variables

Mark Pendergraft markp at Meadgilman.com
Fri Oct 12 19:22:01 EDT 2007


The problem isn't passing variables in a form.

The issues is that I have a page with 2 frames.  A title bar, and the
mapguide viewer.  I want to execute some code based on this original
page's URL.

However, the map loads after this page loads.  So it would be worthless
to try and execute code (zoom to a parcel) in the original page.  The
task pane's default page would be a great place to do this.  Just one
problem.  How do I get variables from the original page to the task
pane?

When the map loads, it actually loads about 6 pages.  So passing
variables to the first page means nothing because those variables aren't
being passed to the next page, or the page after that, or the page after
that.  Hence my issues is that I can't pass variables from the original
page containing the map viewer to the task pane or scriptframe which are
frames embedded within frames embedded within frames embedded within the
original page.

 

Hope that wasn't too confusing.  Here's a diagram of my issue.

 

Original Page w/ variables being passed to it. (e.g.
mga.aspx?JobNo=12345)

                -titleFrame

-ViewerFrame

                                -Unamed 2 row frame

                                                -Unamed 2 column frame

                                                                -mapArea

 
-taskArea

 
-taskBar

 
-taskFrame

 
-taskListFrame

 
-taskPaneFrame (this is where the code should execute, using variables
from the original page)

                                                -statusbarFrame

 

 

From: mapguide-users-bounces at lists.osgeo.org
[mailto:mapguide-users-bounces at lists.osgeo.org] On Behalf Of Ivan
Milicevic
Sent: Friday, October 12, 2007 4:01 PM
To: MapGuide Users Mail List
Subject: RE: [mapguide-users] Pass variables

 

why don't you try put some values into hidden forms and then pass it via
javascript to the other frame... just suggestion.

 

________________________________

From: mapguide-users-bounces at lists.osgeo.org on behalf of Mark
Pendergraft
Sent: pet 12.10.2007 22:53
To: MapGuide Users Mail List
Subject: RE: [mapguide-users] Pass variables

A little bit.

I think I have solved this by putting some javascript code into my
taskpane default page, which gets the url for the top frame
(top.location.href)

Then I split it by the '?' character, and divide from there.

Of course, all this requires that the original page uses explicit paths
to the pages being opened in the original 2 frames (took me a while to
get that figured out).

 

Seems to work okay, but I'm definitely open to suggestions/hints.

 

 

-Mark Pendergraft

 

From: mapguide-users-bounces at lists.osgeo.org
[mailto:mapguide-users-bounces at lists.osgeo.org] On Behalf Of Ivan
Milicevic
Sent: Friday, October 12, 2007 12:45 PM
To: MapGuide Users Mail List
Subject: RE: [mapguide-users] Pass variables

 

Familiar with using ajax?

 

________________________________

From: mapguide-users-bounces at lists.osgeo.org on behalf of Mark
Pendergraft
Sent: pet 12.10.2007 18:38
To: mapguide-users at lists.osgeo.org
Subject: [mapguide-users] Pass variables

Is there a way to pass variables from my default page (which creates two
frames - titleFrame and viewerFrame) to the task page page?

 

I'm having trouble storing session variables when the map loads and
retrieving them from the task pane afterwards.  It's as if the session
variables are expiring due to the fact that a new frame has been
created.  And seeing as mapguide opens a bunch of pages once it loads, I
don't think it would be feasible to rewrite the viewer code just to
continue passing along a few custom variables to the following pages.

 

 

Error! Filename not specified.

Ph: (425) 486-1252  Fx: (425) 486-6108  www.meadgilman.com
<http://www.meadgilman.com/> 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapguide-users/attachments/20071012/bcf092d0/attachment.html


More information about the mapguide-users mailing list