This question already has an answer here:
- JavaScript open in a new window, not tab 13 answers
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