|
Rank: Advanced Member Groups: Member
Joined: 4/14/2009 Posts: 33
|
Have problems with eo: Menu and cross-frame in Firefox and Safari. Use data binding / DataTable and most NavigateUrl is "dbpage.aspx?PageNr=48" and other PageNr id. The problem is when I use Firefox and Safari, click on a link that goes as for exemple to the "member/default.aspx" and then select a link in the menu eg "dbpage.aspx?PageNr=161" This page I land on then becomes "/member/dbpage.aspx". NavigateUrl in the database is "dbpage.aspx?PageNr=161" This problem I have is not in Internet Explorer.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi,
We have looked into this and it appears to be a FireFox bug. We only call window.open with whatever Url you provide, for some reason IE interperts the base Url correctly but FireFox doesn't. You can try to call Page.ResolveUrl before passing the Url to the menu and that should resolve the issue for you.
Thanks!
|
|
Rank: Advanced Member Groups: Member
Joined: 4/14/2009 Posts: 33
|
And how could it possibly look like to call Page.ResolveUrl in this code?
Code: Visual Basic.NET
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles me.Load
MyConnection = New SqlConnection(System.Configuration.ConfigurationManager.AppSettings.Get("MyJunisConnection"))
Dim mainDs As DataSet = CreateDataSet()
Menu1.DataSource = mainDs
Menu1.DataBind()
End Sub
'....................................
Protected Sub Menu1_ItemDataBound(ByVal sender As Object, ByVal e As EO.Web.NavigationItemEventArgs) Handles Menu1.ItemDataBound
Dim record As DataRow = CType(Menu1.DataItem, DataRow)
If CType(record.Item("NodeId"), Integer) = 1 or CType(record.Item("NodeId"), Integer) = 2 Then
e.MenuItem.Visible = False
End If
End Sub
'....................................
Private Function CreateDataSet() As DataSet
Dim SelectCommand As String = "SELECT NodeId, ParentNodeId, sidnamn, NavigateUrl, target from sidor Order By NodeId ASC"
MyDataAdapter = New SqlDataAdapter(SelectCommand, MyConnection)
MyConnection.Open()
Dim ds As New DataSet()
Dim table As DataTable = ds.Tables.Add("drag_sidor")
Dim cmd As New SqlCommand(SelectCommand, MyConnection)
Dim reader As SqlDataReader = cmd.ExecuteReader()
table.Load(reader)
Dim nodeIdColumn As DataColumn = table.Columns("nodeId")
Dim parentNodeIdColumn As DataColumn = table.Columns("ParentNodeId")
Dim r As DataRelation = ds.Relations.Add(nodeIdColumn, parentNodeIdColumn)
r.Nested = True
Return ds
MyConnection.Close()
End Function
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
You would do it inside Menu1_ItemBound. Or write a recursive function and call it inside Page_Load after you call DataBind.
Thanks
|
|