Link to home
Start Free TrialLog in
Avatar of mikewilson55
mikewilson55

asked on

popup window is minimizing when it opens

I have a pop window to display a note but it appears and then minimizes as the page behind seems to be doing a postback.  I have traced the code and the postback occurs before the popup window code runs but visibly the window appears to redraw after the popup appears.  Here's my code under button to call poopup.

Protected Sub wgNote_ClickCellButton(ByVal sender As Object, ByVal e As Infragistics.WebUI.UltraWebGrid.CellEventArgs) Handles wgNote.ClickCellButton
        Dim Value As String
        Dim FacilityId As String

        Value = e.Cell.Row.Cells(1).Value
        facilityid = e.Cell.Row.Cells(2).Value

        System.Web.HttpContext.Current.Response.Write("<SCRIPT LANGUAGE=""JavaScript"">" & vbCrLf)
        System.Web.HttpContext.Current.Response.Write("my_window=window.open('" & "NotePopupFacility.aspx?NoteID=" & Value & "&Facilityid=" & FacilityId & "', '','width=600,height=450,resizable=no,status=no,menubar=no,scrollbars=yes,toolbar=no');")
        System.Web.HttpContext.Current.Response.Write("</SCRIPT>")
    End Sub
SOLUTION
Avatar of David H.H.Lee
David H.H.Lee
Flag of Malaysia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Hi mikewilson55,
It is adviceable to separate the javascript code and server script code for easier maintainability and reuseable. However, i'm glad you find the solution that you need here. Cheers.