<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Arh... my bad... it is of course: "Refresh()" :D<br>
<pre class="moz-signature" cols="72">Regards, Kenneth, GEOGRAF A/S
</pre>
<br>
<br>
Martin Morrison skrev:
<blockquote
cite="mid:FD2BD3B38865714984074E06C499BB4C1A791D@exchange1.corp.edsi.com"
type="cite">
<pre wrap="">Refesh() or Refresh()????
-----Original Message-----
From: <a class="moz-txt-link-abbreviated" href="mailto:mapguide-users-bounces@lists.osgeo.org">mapguide-users-bounces@lists.osgeo.org</a>
[<a class="moz-txt-link-freetext" href="mailto:mapguide-users-bounces@lists.osgeo.org">mailto:mapguide-users-bounces@lists.osgeo.org</a>] On Behalf Of Kenneth,
GEOGRAF A/S
Sent: Friday, December 14, 2007 4:18 PM
To: MapGuide Users Mail List
Subject: Re: [mapguide-users] Can anyone tell me why I can't do a
refresh
The frame hierachy problem aside, the function is called "Refesh()" not
"refresh()".
Also, most frames have a function called "GetMapFrame()", that will ease
the problem of finding the right frame.
Regards, Kenneth, GEOGRAF A/S
gom skrev:
</pre>
<blockquote type="cite">
<pre wrap="">I have the following code in vb.net. I get a javascript error when I
</pre>
</blockquote>
<pre wrap=""><!---->try to
</pre>
<blockquote type="cite">
<pre wrap="">do the refresh. If I place an html button in the page and execute
parent.parent.mapFrame.refresh(); It refreshes the map with my group
</pre>
</blockquote>
<pre wrap=""><!---->turned
</pre>
<blockquote type="cite">
<pre wrap="">off. For some reason, when I execute the sub as shown below,
parent.parent.mapFrame is not valid but parent.mapFrame is. Same page
</pre>
</blockquote>
<pre wrap=""><!---->as
</pre>
<blockquote type="cite">
<pre wrap="">the html button but obviously executed differently. The debugger
</pre>
</blockquote>
<pre wrap=""><!---->shows that
</pre>
<blockquote type="cite">
<pre wrap="">parent is viewFrame in this context and parent.mapFrame is valid.
</pre>
</blockquote>
<pre wrap=""><!---->However,
</pre>
<blockquote type="cite">
<pre wrap="">the refresh throws an error saying object or method does not exist. I
</pre>
</blockquote>
<pre wrap=""><!---->feel
</pre>
<blockquote type="cite">
<pre wrap="">like I'm missing something obvious but cannot discover what it is.
</pre>
</blockquote>
<pre wrap=""><!---->Anyone
</pre>
<blockquote type="cite">
<pre wrap="">have any help.
Thanks in advance.
Protected Sub RadioButton1_CheckedChanged(ByVal sender As Object,
</pre>
</blockquote>
<pre wrap=""><!---->ByVal e As
</pre>
<blockquote type="cite">
<pre wrap="">System.EventArgs)
InitializeWebTier()
Dim mySiteConnection As New MgSiteConnection
Dim myUserInfo As New
MgUserInformation(Session.Item("sessionID").ToString)
mySiteConnection.Open(myUserInfo)
Dim myFeatureService As MgFeatureService =
mySiteConnection.CreateService(MgServiceType.FeatureService)
Dim myResourceService As MgResourceService =
mySiteConnection.CreateService(MgServiceType.ResourceService)
Dim myMap As New MgMap
myMap.Open(myResourceService, m_CurrentMap())
Dim myLayerGroup As MgLayerGroup = Nothing
Dim myLayerGroups As MgLayerGroupCollection =
</pre>
</blockquote>
<pre wrap=""><!---->myMap.GetLayerGroups
</pre>
<blockquote type="cite">
<pre wrap=""> Dim i As Integer = 0
For Each myLayerGroup In myLayerGroups
If myLayerGroup.Name = "Group1" Then
myLayerGroup.SetVisible(False)
End If
Next
myMap.Save()
Dim myKey As String = "mapRefresh"
If Not Page.ClientScript.IsStartupScriptRegistered(Me.GetType,
myKey) Then
Dim myScript As String = "parent.mapFrame.refresh();"
Page.ClientScript.RegisterStartupScript(Me.GetType, myKey,
myScript, True)
End If
End Sub
</pre>
</blockquote>
<pre wrap=""><!---->_______________________________________________
mapguide-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:mapguide-users@lists.osgeo.org">mapguide-users@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="http://lists.osgeo.org/mailman/listinfo/mapguide-users">http://lists.osgeo.org/mailman/listinfo/mapguide-users</a>
_______________________________________________
mapguide-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:mapguide-users@lists.osgeo.org">mapguide-users@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="http://lists.osgeo.org/mailman/listinfo/mapguide-users">http://lists.osgeo.org/mailman/listinfo/mapguide-users</a>
</pre>
</blockquote>
</body>
</html>