Opening new asp page using response.redirect

  • Thread starter Thread starter anuragsji
  • Start date Start date
A

anuragsji

Hi,

I have one combo box and GO button on the click of GO button page
submitted and according to selection of one of the option from combo I
want to redirect my page to some new asp page but at the same time in
new window of browser.
I could have achieved this using window.open() of javascript but then
it will serve as pop up and clients requirement is that not to show as
popup window due to many users blocked popups.

Any suggestions, How can I achieve this using response.redirect or any
coding which is not serve as popup window.

The work is in ASP 3.0 not in ASP.NET

Thanks in Advance,
Anurag
 
well, the only solution I can think of is to use an target="_blank" on a <a
href..

I believe if you put it on a <form target="_blank" any submitting buttons
will open in a new browser...

Karl
 
Hi,
I have one combo box and GO button on the click of GO button page
submitted and according to selection of one of the option from combo I
want to redirect my page to some new asp page but at the same time in
new window of browser.
I could have achieved this using window.open() of javascript but then
it will serve as pop up and clients requirement is that not to show as
popup window due to many users blocked popups.

Any suggestions, How can I achieve this using response.redirect or any
coding which is not serve as popup window.

The work is in ASP 3.0 not in ASP.NET

Thanks in Advance,
Anurag

You can't do this with Response.Redirect (not in asp 3.0 and not in
asp.net 1.1 or 2.0) because the response doesn't understand "windows",
so it can't open a new one.

The popup-blockers usually block window.open statements that are fired
automatically (as in an "onload" function).
Window.open statements that are fired as a direct result of a
user-action (onclick) are usually permitted! So you will want to open
the new window first and then see what should be displayed there.

Hans Kesting
 
Hi,
As I remember ; This would not work in ASP but works in ASP.NET
<asp:HyperLink ID="myLink" Target="_blank"
NavigateUrl="http:../blah.aspx"
/>
 
I thought that may be .NET group know anything about the same thats why
I posted on that.
I also used target="_blank" in <Form...> tag but doing so it have an
effect on all options on the combo box not only for 1 option. I need
only for single option which if selected then redirect to new window.

Thanks to all,
Anurag
 
How about change the form target dynamically, for example, add a button on
the form and use following code in its click event:


if ( document.body.all("DropDownBox").selectedIndex==2)
{
MyForm.target ="_blank";
}

MyForm.submit();


Regards,


Luke Zhang
Microsoft Online Community Support

==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================

(This posting is provided "AS IS", with no warranties, and confers no
rights.)
 
Back
Top