I have the following code in my web page, I can see the pop up window on my local page, but when I deploy the code to web server I don't see any pop up window. Pop up blocker is disabled on the server . I am trying to open this pop up window on drop down menu selected index changed.
Private Sub ddlQaTables_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ddlQaTables.SelectedIndexChanged
'-------------------------------------------------
' Run Query and display in Excel
'-------------------------------------------------
Dim dt As DataTable = DataProcessDB.GetQaQueryResult(ddlQaTables.SelectedValue.ToString)
Dim scriptText As String = ""
dt= session("test")
If Not (dt Is Nothing) Then
If Not ClientScript.IsStartupScriptRegistered("alert") Then
Page.ClientScript.RegisterStartupScript(Me.[GetType](), "alert", "openpopup();", True)
End If
End If
End Sub
and this is my javascript
<script language="javascript" type="text/javascript">
function openpopup() {
var a = document.getElementById('<%= ddlQaTables.ClientID %>').selectedIndex;
var b = document.getElementById('<%= ddlQaTables.ClientID %>').options[a].value;
if (b == "-1") {
alert('Please Select item');
}
else {
window.open("DataQAGrid.aspx", "List", "scrollbars=yes,resizable=no,width=1050,height=900");
}
}
</script>