I have a secure dnn portal with many child portals. If I offer a link in my custom module to open a new browser window, the call fails over to the root portal instead of the page I called. viewHelp.aspx is in the custom module directory.
I use:
strRelPath = Me.ResolveUrl("viewHelp.aspx")
In a literal:
strLitLaunchHelp = "<script language=""javascript"">" & vbCrLf
strLitLaunchHelp = strLitLaunchHelp & "function launchHelp(){" & vbCrLf
strLitLaunchHelp = strLitLaunchHelp & " var strBar = 'directories=no,location=no,menubar=no,titlebar=no,toolbar=no,scrollbars=yes,width=800,height=600,resizable=yes';" & vbCrLf
strLitLaunchHelp = strLitLaunchHelp & " var strLoc = '" & strRelPath & "';" & vbCrLf
strLitLaunchHelp = strLitLaunchHelp & " var winEdit = open(strLoc,'Help',strBar);}" & vbCrLf
strLitLaunchHelp = strLitLaunchHelp & "</script>" & vbCrLf & vbCrLf
Seems like the long way and it still does not work unless the user clicks on the link a second time.