Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1825
Keeping focus on a new browser window?
posted
Evening all,
Hope someone can tell me what it is I am doing wrong with the below code.
Its suppose to, on clicking the btn in the grids cell, popup a new browser window and keep it on top of the calling browser.

VB.net codebehind, on a ASP.net page.

Protected Sub uwGridResults_ClickCellButton(ByVal sender As Object, ByVal e
As Infragistics.WebUI.UltraWebGrid.CellEventArgs) Handles
uwGridResults.ClickCellButton

Try
Dim strTheLink As String = ""
strTheLink = "file:" & e.Cell.Row.Cells.FromKey("LinkToFollow").Text
strTheLink = strTheLink.Replace("\", "/")

Dim strLink As String = "<script> var myW = window.open('" & strTheLink
& "', 'myW'); myW.focus(); </script> " ' '_self' parent.resizeTo(480,600);

ClientScript.RegisterStartupScript(Me.GetType(), "ClientScript", strLink)

Catch ex As Exception

End Try


End Sub

What it does is call up the document in the new browser and then bring the calling browser to the front, hiding the popup document.

What am I doing wrong?

Thanks
Deasun