SitePoint Sponsor

User Tag List

Results 1 to 8 of 8
  1. #1
    SitePoint Enthusiast
    Join Date
    Mar 2001
    Location
    upstate NY, USA
    Posts
    47
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'm having problems opening a popUp window (pointing to an html page) in IE5.
    Here is the javascript call I used which worked in IE4.x:
    <A HREF="myPage.htm" target="newWin" onClick="popUp()">Link</A>

    I next tried this call: <A HREF="javascript:popUp()">Link</A>
    which workk fine in NAV but not IE5.

    For the function I used:
    function popUp()
    {
    x = open('', 'newWin', 'width=800, height=600, resizable, scrollbars');
    x.document.open();
    }

    where I substituted the URL for the null argument for my second call.

    I'm not sure if this is an IE5 bug or what. Any help would be appreciated.
    Last edited by Kevin Yank; Mar 11, 2001 at 19:27.

  2. #2
    JavaScript Guru (Big Ego) Arielladog's Avatar
    Join Date
    Jul 1999
    Location
    SC, USA
    Posts
    390
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hey,

    Your script looks fine, and this works perfectly fine for me in IE 5.5

    Code:
    <script>
    function popUp()
    {
    x = open('', 'newWin', 'width=800, height=600, resizable, scrollbars');
    x.document.open();
    }
    </script>
    <A HREF="javascript:popUp()">Link</A>
    Perhaps your IE 5 is bad. What you can do is you can try repairing it. Go to control panel | add/remove programs. Find Microsoft Internet Explorer and click remove. Then, click repair when the new window pops up and be prepared to restart later. Hopefully that'll work.

    aDog :cool:
    Last edited by Kevin Yank; Mar 11, 2001 at 19:26.

  3. #3
    SitePoint Author Kevin Yank's Avatar
    Join Date
    Apr 2000
    Location
    Melbourne, Australia
    Posts
    2,571
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    jtsmk,

    Is there any reason why you're opening the window using JavaScript and then loading the document with the HREF attribute of the HTML link? Why not do the whole thing with your JavaScript function?
    Kevin Yank
    CTO, sitepoint.com
    I wrote: Simply JavaScript | BYO PHP/MySQL | Tech Times | Editize
    Baby’s got back—a hard back, that is: The Ultimate CSS Reference

  4. #4
    SitePoint Enthusiast
    Join Date
    Mar 2001
    Location
    upstate NY, USA
    Posts
    47
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by kyank
    jtsmk,

    Is there any reason why you're opening the window using JavaScript and then loading the document with the HREF attribute of the HTML link? Why not do the whole thing with your JavaScript function?
    Kevin,
    I did try loading the document with the URL within the function. This worked everwhere except IE5, where it opened multiple windows. About the only way it works is to document.write the document (not practical for a large document). I'm beginning to think it's my Compaq IE5 v 1.0.0.4

  5. #5
    SitePoint Enthusiast
    Join Date
    Mar 2001
    Location
    upstate NY, USA
    Posts
    47
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by Arielladog
    Hey,

    Your script looks fine, and this works perfectly fine for me in IE 5.5

    Code:
    <script>
    function popUp()
    {
    x = open('', 'newWin', 'width=800, height=600, resizable, scrollbars');
    x.document.open();
    }
    </script>
    <A HREF="javascript:popUp()">Link</A>
    Perhaps your IE 5 is bad. What you can do is you can try repairing it. Go to control panel | add/remove programs. Find Microsoft Internet Explorer and click remove. Then, click repair when the new window pops up and be prepared to restart later. Hopefully that'll work.

    aDog
    aDog,
    I might have a bad IE5 (Compaq Custom IE5 v1.0.0.4). But how can I repair after I remove it? I would have to download a new copy?

  6. #6
    JavaScript Guru (Big Ego) Arielladog's Avatar
    Join Date
    Jul 1999
    Location
    SC, USA
    Posts
    390
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hey,

    What the remove feature for IE 5 does is bring up an option to do some things to it (I don't think you can really remove it b/c it's tied to OS (unless you use a special program)), so, click remove then click repair (you're not removing it).

    aDog

  7. #7
    cd /pub; more beer diacono's Avatar
    Join Date
    Dec 2000
    Location
    Horsham, West Sussex, UK
    Posts
    277
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by jtsmk


    aDog,
    I might have a bad IE5 (Compaq Custom IE5 v1.0.0.4). But how can I repair after I remove it? I would have to download a new copy?
    i've had that problem recently... i cant open any new windows with ie5.5. it just seems to <err...> do nothing!!

    what heppens when you try to open a new window? btw, i reinstalled ie5.5 and i've still got the problem.
    DIEGO MOORE

  8. #8
    SitePoint Enthusiast
    Join Date
    Mar 2001
    Location
    upstate NY, USA
    Posts
    47
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I just solved my problem by installing the IE Service Pack 1 upgrade. Thanks for the help, hope this solves others with similiar problems.

    Originally posted by jtsmk
    I'm having problems opening a popUp window (pointing to an html page) in IE5.
    Here is the javascript call I used which worked in IE4.x:
    <A HREF="myPage.htm" target="newWin" onClick="popUp()">Link</A>

    I next tried this call: <A HREF="javascriptopUp()">Link</A>
    which workk fine in NAV but not IE5.

    For the function I used:
    function popUp()
    {
    x = open('', 'newWin', 'width=800, height=600, resizable, scrollbars');
    x.document.open();
    }

    where I substituted the URL for the null argument for my second call.

    I'm not sure if this is an IE5 bug or what. Any help would be appreciated.


Bookmarks

Posting Permissions

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