javascript window

Discussion in 'HTML' started by dorayme, Dec 27, 2004.

  1. dorayme

    dorayme Guest

    Hi, appreciate any help on this one:

    I was mildly surprised to see how a site of mine behaved in Safari 1.1 (I
    know, an older version on a Mac running 10.2, again, not the very latest but
    it is what my friend had)

    The first thing I noticed was that user-activated pop-up windows appeared
    tiny and quite unresizable. On all other browsers I have tested, this has
    never happened. Basically I allow the user to see a detail of something
    without losing his place by a window popping up with the info. The window
    has a certain normally adequate size and so on. The code I have used for
    years in the head of the html source is :

    <script language="JAVASCRIPT" type="TEXT/JAVASCRIPT">
    <!-- Hide script from old browsers


    function newWindow(fabrics) {
    fabricsWindow = window.open(fabrics, 'fredRain',
    'width=600,height=400,resizable=yes')
    fabricsWindow.focus()

    }


    // End hiding script from old browsers -->

    </script>

    and I use the following type of code in the relevant hyperlink in the body:

    <a class="plain"
    href="javascript:newWindow('../newSeasonsViewer/wave.html')">
    See picture of one</a>

    which has always worked well except for this Safari. I would like to know if
    it works in the latest Safari on 10.3 but how do I do it? The screen capture
    facilities for urls on various browsers do not seem to cater for such a
    "user operated" pop up.

    dorayme
     
    dorayme, Dec 27, 2004
    #1
    1. Advertising

  2. dorayme

    DU Guest

    dorayme wrote:
    > Hi, appreciate any help on this one:
    >
    > I was mildly surprised to see how a site of mine behaved in Safari 1.1 (I
    > know, an older version on a Mac running 10.2, again, not the very latest but
    > it is what my friend had)
    >
    > The first thing I noticed was that user-activated pop-up windows appeared
    > tiny and quite unresizable. On all other browsers I have tested, this has
    > never happened. Basically I allow the user to see a detail of something
    > without losing his place by a window popping up with the info. The window
    > has a certain normally adequate size and so on. The code I have used for
    > years in the head of the html source is :
    >
    > <script language="JAVASCRIPT" type="TEXT/JAVASCRIPT">
    > <!-- Hide script from old browsers


    The "hiding" from old browsers no longer makes sense really as everyone
    uses something much better than NS 3. So, <!-- --> part is no longer needed.

    >
    >
    > function newWindow(fabrics) {
    > fabricsWindow = window.open(fabrics, 'fredRain',
    > 'width=600,height=400,resizable=yes')
    > fabricsWindow.focus()


    There is no need for the focus() call ... unless the pointer in memory
    (fabricsWindow) exists and the window is not closed: then and only then,
    the focus() call makes sense as it solves the most frequently
    encountered usability problem with requested popup window.

    e.g.:

    var fabricsWindow = null; // global variable
    function newWindow(fabrics) {
    if(fabricsWindow == null || fabricsWindow.closed)
    { fabricsWindow = window.open(fabrics, 'fredRain',
    'width=600,height=400,resizable=yes');
    }
    else
    {
    fabricsWindow.focus();
    };
    }

    >
    > }
    >
    >
    > // End hiding script from old browsers -->
    >
    > </script>
    >
    > and I use the following type of code in the relevant hyperlink in the body:
    >
    > <a class="plain"
    > href="javascript:newWindow('../newSeasonsViewer/wave.html')">
    > See picture of one</a>


    Javascript links defeats features and settings in tab capable browsers.
    Some 8-12% of users turn off javascript: so the link as coded will
    prevent them from accessing the wave.html resource.

    "Users hate unwarranted pop-up windows. When they want the destination
    to appear in a new page, they can use their browser's 'open in new
    window' command -- assuming, of course, that **__the link is not a piece
    of code that interferes with the browser's standard behavior__**."
    Jakob Nielsen, Top Ten Web-Design Mistakes of 2002,
    6. JavaScript in Links,
    http://www.useit.com/alertbox/20021223.html

    DU
    --
    The site said to use Internet Explorer 5 or better... so I switched to
    Mozilla 1.7.3 :)

    >
    > which has always worked well except for this Safari. I would like to know if
    > it works in the latest Safari on 10.3 but how do I do it? The screen capture
    > facilities for urls on various browsers do not seem to cater for such a
    > "user operated" pop up.
    >
    > dorayme
    >
     
    DU, Dec 27, 2004
    #2
    1. Advertising

  3. dorayme

    dorayme Guest

    > From: DU <>
    > Newsgroups: alt.html
    > Date: Sun, 26 Dec 2004 20:50:26 -0500
    > Subject: Re: javascript window
    >
    > dorayme wrote:
    >> Hi, appreciate any help on this one:
    >>
    >> I was mildly surprised to see how a site of mine behaved in Safari 1.1 (I
    >> know, an older version on a Mac running 10.2, again, not the very latest but
    >> it is what my friend had)
    >>
    >> The first thing I noticed was that user-activated pop-up windows appeared
    >> tiny and quite unresizable. On all other browsers I have tested, this has
    >> never happened. Basically I allow the user to see a detail of something
    >> without losing his place by a window popping up with the info. The window
    >> has a certain normally adequate size and so on. The code I have used for
    >> years in the head of the html source is :
    >>
    >> <script language="JAVASCRIPT" type="TEXT/JAVASCRIPT">
    >> <!-- Hide script from old browsers

    >
    > The "hiding" from old browsers no longer makes sense really as everyone
    > uses something much better than NS 3. So, <!-- --> part is no longer needed.
    >
    >>
    >>
    >> function newWindow(fabrics) {
    >> fabricsWindow = window.open(fabrics, 'fredRain',
    >> 'width=600,height=400,resizable=yes')
    >> fabricsWindow.focus()

    >
    > There is no need for the focus() call ... unless the pointer in memory
    > (fabricsWindow) exists and the window is not closed: then and only then,
    > the focus() call makes sense as it solves the most frequently
    > encountered usability problem with requested popup window.
    >
    > e.g.:
    >
    > var fabricsWindow = null; // global variable
    > function newWindow(fabrics) {
    > if(fabricsWindow == null || fabricsWindow.closed)
    > { fabricsWindow = window.open(fabrics, 'fredRain',
    > 'width=600,height=400,resizable=yes');
    > }
    > else
    > {
    > fabricsWindow.focus();
    > };
    > }
    >
    >>
    >> }
    >>
    >>
    >> // End hiding script from old browsers -->
    >>
    >> </script>
    >>
    >> and I use the following type of code in the relevant hyperlink in the body:
    >>
    >> <a class="plain"
    >> href="javascript:newWindow('../newSeasonsViewer/wave.html')">
    >> See picture of one</a>

    >
    > Javascript links defeats features and settings in tab capable browsers.
    > Some 8-12% of users turn off javascript: so the link as coded will
    > prevent them from accessing the wave.html resource.
    >
    > "Users hate unwarranted pop-up windows. When they want the destination
    > to appear in a new page, they can use their browser's 'open in new
    > window' command -- assuming, of course, that **__the link is not a piece
    > of code that interferes with the browser's standard behavior__**."
    > Jakob Nielsen, Top Ten Web-Design Mistakes of 2002,
    > 6. JavaScript in Links,
    > http://www.useit.com/alertbox/20021223.html
    >
    > DU
    > --
    > The site said to use Internet Explorer 5 or better... so I switched to
    > Mozilla 1.7.3 :)
    >
    >>
    >> which has always worked well except for this Safari. I would like to know if
    >> it works in the latest Safari on 10.3 but how do I do it? The screen capture
    >> facilities for urls on various browsers do not seem to cater for such a
    >> "user operated" pop up.
    >>
    >> dorayme
    >>


    ===========================================================================

    Right, thanks for this, drunclear, I appreciate it. The bit about javascript
    and tabbed browsing was unknown to me though I sometimes use tabbed browsing
    on some browsers! I will need to make further provision for the 8-12% who
    turn js off (for whatever motivation if intentional)

    My user chosen links that pop up (to show fabrics and stuff in small windows
    without losing their place on the main window) are known to be truly useful
    to most users. The window being the right size for the job, being a fixed
    window that changes content according to what fabric is wanting to be
    viewed. It will not be replaced without loss of elegance I fear, I don't
    like the idea of a complete full window or tab for this. I need to put my
    thinking cap on.

    The fact is that most users don't set their browser preferences at all,
    hardly know about such things. The tab capable browsers that I have actually
    used or seen must have been from the 88-92% of them with javascript enabled!
    I also hate unwarranted pop ups. On the machine that I noticed the problem
    (running Safari) the popup window came up but was totally wrong in size
    (absurdly tiny) and I don't know if it had javascript turned off (I saw no
    provision for this in preferences and seemingly very little user settable
    things - but I do not thoroughly know this!)

    dorayme

    PS. As I understand your point about focus, it seems it is useful in my
    case. But I guess I should drop the "older browsers" bit ...
     
    dorayme, Dec 27, 2004
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. RJN
    Replies:
    1
    Views:
    8,797
    Patrik Löwendahl [C# MVP]
    Oct 10, 2004
  2. Andrew Bewley via DotNetMonster.com

    window to window communication (window.opener)

    Andrew Bewley via DotNetMonster.com, Feb 3, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    1,094
    Andrew Bewley via DotNetMonster.com
    Feb 3, 2005
  3. Simon Wigzell
    Replies:
    4
    Views:
    320
    Simon Wigzell
    Sep 15, 2003
  4. IveCal
    Replies:
    0
    Views:
    196
    IveCal
    Apr 2, 2007
  5. Jimmy
    Replies:
    3
    Views:
    471
    Henry
    Aug 16, 2007
Loading...

Share This Page