View Full Version : [CLOSED] Call window like target=_blank codebehind

Mar 19, 2013, 6:57 AM
here my current Function, and i would like to let ext.net.window will show in parent.window like <a href= "" target="_blank">

Public Shared Function ExtShowWindows(ByVal strTitle As String, ByVal strWindowsID As String, ByVal intWidth As Integer, ByVal intHeight As Integer, ByVal strURL As String, Optional ByVal userICon As Ext.Net.Icon? = Nothing, Optional ByVal intXPos As Integer = 10, Optional ByVal intYPos As Integer = 10) As Ext.Net.Window
Dim objWin As New Ext.Net.Window

objWin.ID = strWindowsID
objWin.Title = strTitle
objWin.Width = intWidth
objWin.Height = intHeight
If Not userICon Is Nothing Then
objWin.Icon = userICon
End If
objWin.Modal = True
objWin.CloseAction = CloseAction.Destroy
objWin.Loader = New ComponentLoader
objWin.Loader.Url = strURL
objWin.ConstrainHeader = True ''use to bound the title bar not outside the parent
objWin.Loader.Mode = LoadMode.Frame
objWin.Loader.LoadMask.ShowMask = True
objWin.X = intXPos.ToString
objWin.Y = intYPos.ToString
'objWin.RenderTo = "parent.ext.getBody()"
Return objWin
End Function

From http://forums.ext.net/showthread.php?9935

win = new parent.Ext.Window(
renderTo: parent.Ext.getBody(),
itemId: _itemId,
maximizable: _maximizable,
resizable: _resizable,
collapsible: _collapsible,
constrain: false,
title: _title,
height: _height,
width: _width,
modal: _modal,
frame: true

Mar 19, 2013, 9:33 AM

Do you need to implement it without JavaScript at all? If so, then, unfortunately, it is impossible. The code behind of another page doesn't have an access to another page.

But you could call any JavaScript from code behind.

X.Js.Call("openWindowInParent", "parameters");