Results 1 to 13 of 13

Thread: [Resolved] Open new instance of I.E.

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Oct 2001
    Location
    Indiana
    Posts
    612

    Resolved [Resolved] Open new instance of I.E.

    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
    Last edited by indydavid32; Dec 7th, 2004 at 02:01 PM. Reason: Resolved
    David Wilhelm

  2. #2
    Fanatic Member
    Join Date
    Oct 2000
    Location
    Reading, UK
    Posts
    870
    if it is when you click on a hyperlink then set the target property to _blank.
    www.vb-tech.com
    .Net Freelance Development
    http://weblog.vb-tech.com/nick
    My blog

  3. #3

    Thread Starter
    Fanatic Member
    Join Date
    Oct 2001
    Location
    Indiana
    Posts
    612
    No hyper link, it would be when I would do a response.redirect("blah.aspx")
    David Wilhelm

  4. #4
    Fanatic Member
    Join Date
    Oct 2000
    Location
    Reading, UK
    Posts
    870
    this is a bit of code i found in an app someone did here at work:
    Code:
    response.write("<script>javascript:mywin.window.open('webform3.aspx','FileOpen','menubar=no,scrolling=no,locationbar=no,width=500,height=350');my_win.focus();</script>")
    (for some reason it puts a space between java and script with shouldn't be there

    hope this helps
    Nick
    www.vb-tech.com
    .Net Freelance Development
    http://weblog.vb-tech.com/nick
    My blog

  5. #5

    Thread Starter
    Fanatic Member
    Join Date
    Oct 2001
    Location
    Indiana
    Posts
    612
    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?
    David Wilhelm

  6. #6
    Banished Cander's Avatar
    Join Date
    Dec 2000
    Location
    Why do you care?
    Posts
    6,913
    No there isnt. You cant open windows on the client from the server. The only option is the javascript option given to you.
    Stack Overflow
    See the features of Visual Studio 2010 and C# 4.0: The 10-4 show on Channel9

  7. #7

    Thread Starter
    Fanatic Member
    Join Date
    Oct 2001
    Location
    Indiana
    Posts
    612
    Ok, can you guys help make it work then?

    I get an error saying mywin is undefined. What should I have there?
    David Wilhelm

  8. #8
    Fanatic Member
    Join Date
    Oct 1999
    Location
    England
    Posts
    982
    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.

    Code:
    Response.Write("<script>javascript:window.open('userguide/cbhelp.htm','FileOpen','menubar=no,scrolling=no,locationbar=no,width=500,height=350');</script>")
    I removed the my_win part altogether.


    Things I do when I am bored: DotNetable

  9. #9
    I wonder how many charact
    Join Date
    Feb 2001
    Location
    Savage, MN, USA
    Posts
    3,704
    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.

  10. #10
    Fanatic Member
    Join Date
    Oct 1999
    Location
    England
    Posts
    982

    Ok I have tested that and it works.

    If using _blank is it possible to switch off the menubar, toolbars, and address bars.


    Things I do when I am bored: DotNetable

  11. #11
    I wonder how many charact
    Join Date
    Feb 2001
    Location
    Savage, MN, USA
    Posts
    3,704
    Nope...

    The only thing that usually works is if you have
    'javascriptopmyWindow()' 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.

  12. #12
    I wonder how many charact
    Join Date
    Feb 2001
    Location
    Savage, MN, USA
    Posts
    3,704
    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>
    Last edited by nemaroller; Aug 2nd, 2004 at 11:33 AM.

  13. #13

    Thread Starter
    Fanatic Member
    Join Date
    Oct 2001
    Location
    Indiana
    Posts
    612

    Re: Open new instance of I.E.

    Tanks David Robin.
    David Wilhelm

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width