lundi 29 juin 2015

How Javascript Window.open() opens a window in a popup window [duplicate]


This question already has an answer here:

I'm using an ASP.NET C# webform application(.Net 4.5)

And I have a dropdownlist. Whever User make a selection for dropdown list I want a popup windows to show.

Here is my code:

protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e)
{
    ClientScript.RegisterStartupScript(this.GetType(), "openwindow", "openwindow()", true);
}

and the javascript function is

function openwindow()
{
    window.open('.//Webform1.aspx?CID=1234', '_blank');
}

This code works but instead of poup windows I get new tabs in the same browser window.

How make these new windows pop up instead.


Aucun commentaire:

Enregistrer un commentaire