How would you redirect to a new page and open a new instance of IE.
Also, would it be possible to open this web page and have it invisible until the processing is done?
Thanks
Printable View
How would you redirect to a new page and open a new instance of IE.
Also, would it be possible to open this web page and have it invisible until the processing is done?
Thanks
if it is when you click on a hyperlink then set the target property to _blank.
No hyper link, it would be when I would do a response.redirect("blah.aspx")
this is a bit of code i found in an app someone did here at work:
(for some reason it puts a space between java and script with shouldn't be thereCode:response.write("<script>javascript:mywin.window.open('webform3.aspx','FileOpen','menubar=no,scrolling=no,locationbar=no,width=500,height=350');my_win.focus();</script>")
hope this helps
Nick
I couldn't get that to work. Anyone else have any ideas? I just want to open one of my aspx pages in a new IE window, then continue processing on my main web page. Some sort of Response command perhaps?
No there isnt. You cant open windows on the client from the server. The only option is the javascript option given to you.
Ok, can you guys help make it work then?
I get an error saying mywin is undefined. What should I have there?
I know this is an old thread but I wanted to do the same thing as indydavid32.
I managed to get the code to work so am posting it for future searchers.
I removed the my_win part altogether.Code:Response.Write("<script>javascript:window.open('userguide/cbhelp.htm','FileOpen','menubar=no,scrolling=no,locationbar=no,width=500,height=350');</script>")
Popup blockers will stop that javascript code from working however. The only way to be sure it will open is to use a hyperlink with target =_blank.
:ehh:
Ok I have tested that and it works.
If using _blank is it possible to switch off the menubar, toolbars, and address bars.
Nope...
The only thing that usually works is if you have
'javascript:popmyWindow()' in an HREF.... I would think most pop-up blockers would allow that to run...most blockers only block onLoad actions of the Body tag.
Here's some test code:
Code:<html>
<body onLoad="Jopit()">
<script language="javascript">
function Jopit()
{
window.open('http://www.google.com');
}
</script>
<a href="javascript:Jopit()"> Hi </a>
</body>
</html>
Tanks David Robin. :)