views:

318

answers:

2

i have an aspx page which has a button on it. When i click on the button, a popup should open up and the page should automatically redirect to next page. So Page1 has button1. When button1 is clicked popup1 is opened and page1 behind goes to page2. how do i do that?

A: 

If you are looking for a popup in a browser, you want to use Javascript.

button1.onclick() = window.location="page2.html"; window.alert("Press OK to continue to Page 2.");

Use window.alert if you just want a plain dialogue box.

calico-cat
but how does the page1 goto page2?
siner
Create a Javascript function that contains window.location = "page2.html". If the button is a submit button, the function should contain submit().
calico-cat
A: 

OK if you want to display a popup and not a message box, you could use something like:

function ShowAndMove()
{
    window.open('popup.htm');
    form.submit();
}
Paulo Santos