Link to home
Create AccountLog in
Avatar of shieldguy
shieldguyFlag for United Kingdom of Great Britain and Northern Ireland

asked on

Popup blocker stoping my popup window to open

I have a code which when called open a new window I am calling it on button click event of asp.net form

but the popup blocker is not allowing those page to open.

Now i dont want to disable popup blocker in all pc where this page need to open
is their any around this problem

Thanks
imran
Avatar of Joel Coehoorn
Joel Coehoorn
Flag of United States of America image

Can you show the code that opens your popup?
Avatar of shieldguy

ASKER

here it is

    Private Sub btnPrintList_Process_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnPrintList_Process.Click
        PrintPickList()
    End Sub
 
 
 
   Private Sub PrintPickList()
       Dim sb As New StringBuilder()
        sb.Append("<script>")
        sb.Append("window.open('PickList.aspx?type=normalorder', '', '');")
        sb.Append("</scri")
        sb.Append("pt>")
 
        'Page.RegisterStartupScript("test", sb.ToString())
        ClientScript.RegisterStartupScript(Me.GetType(), "Printing Pick List", sb.ToString)
    End Sub

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Joel Coehoorn
Joel Coehoorn
Flag of United States of America image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
I didnt get it can you explain in a bit more detail

I would really appreciate any example

Thanks
Ok I get you
Actually I am bound to do it this way, The form consists of many more other fields and button so I need this page to be open which a specific button is click on the page

I hope I am clear enough

Thanks
I understand.  What I want you to do is a hook that javascript function to the button's click event on the client side.  You don't need to raise a server event to process a button click in javascript.