DiaH
01-21-2004, 05:19 PM
I have the following script I'm calling server side through an image button:
Dim sb As New StringBuilder
sb.Append("<script> var NewWindow;")
sb.Append("NewWindow = window.open(")
sb.Append("'../../legacyreports/reportprinter.aspx?RPPLID={" & Me.txtPreproposalID.Text)
sb.Append("}&RO=" & Session("DODReadonly") & "&RPT=rptPreproposal&Type=PDF")
sb.Append("','Report','toolbar=yes,menubar=yes,resizable=yes,maximize=yes'); NewWindow.focus();")
sb.Append("</script>")
If Not IsStartupScriptRegistered("OpenNew") Then
RegisterStartupScript("OpenNew", sb.ToString())
End If
The pop-up window is not keeping focus. It gets focus for like a split second then goes behind the parent window. How do I get this to stay on top? I editted the reportprinter.aspx to have an onload and onblur events to set focus to itself but that doesn't work either.
Any suggestions would be appreciated.
Thanks,
Dia
Dim sb As New StringBuilder
sb.Append("<script> var NewWindow;")
sb.Append("NewWindow = window.open(")
sb.Append("'../../legacyreports/reportprinter.aspx?RPPLID={" & Me.txtPreproposalID.Text)
sb.Append("}&RO=" & Session("DODReadonly") & "&RPT=rptPreproposal&Type=PDF")
sb.Append("','Report','toolbar=yes,menubar=yes,resizable=yes,maximize=yes'); NewWindow.focus();")
sb.Append("</script>")
If Not IsStartupScriptRegistered("OpenNew") Then
RegisterStartupScript("OpenNew", sb.ToString())
End If
The pop-up window is not keeping focus. It gets focus for like a split second then goes behind the parent window. How do I get this to stay on top? I editted the reportprinter.aspx to have an onload and onblur events to set focus to itself but that doesn't work either.
Any suggestions would be appreciated.
Thanks,
Dia