Can the Favourites Sidebar (IE, Opera, etc.) be addressed selectively (exist or non-exist)?

Discussion in 'Javascript' started by Markus Mohr, Nov 24, 2003.

  1. Markus Mohr

    Markus Mohr Guest

    Hello,

    tonight I'm looking for a javascript piece of code which enables me to
    detect whether the user's internet browser has a favourites sidebar
    open and thus limits the "display space" of the adjacent table to a
    certain width.
    Background: I have created a webpage based on a 2 vs. 4 table
    structure:
    table 01 table02
    table 11 table12
    table21 table22
    table31 table32
    Tables 01 - 31 contain the navigation layer, tables 02 - 32 contain
    various contents. Tables 02 - 32 are open to the right side, i. e.
    tables 01 - 31 have a defined width, tables 02 - 32 have the width of
    "*".
    Now, if a visitor to the website has his favourites sidebar open, the
    width of tables 02 - 32 gets smaller ("* minus width of favourites
    sidebar").
    Is there any way to detect whether the favourites sidebar is open, and
    of which width it is?

    Sincerely


    Markus Mohr
     
    Markus Mohr, Nov 24, 2003
    #1
    1. Advertising

  2. Re: Can the Favourites Sidebar (IE, Opera, etc.) be addressedselectively (exist or non-exist)?

    Markus Mohr <> writes:

    > tonight I'm looking for a javascript piece of code which enables me to
    > detect whether the user's internet browser has a favourites sidebar
    > open


    Mine doesn't. Mostly because it has no favorites sidebar, it's called
    a Hotlist in Opera.

    > and thus limits the "display space" of the adjacent table to a
    > certain width.


    That depends more on the size of the browser than on whether a sidebar
    is open or not.

    > Is there any way to detect whether the favourites sidebar is open, and
    > of which width it is?


    Not that I know of. But as I said, it doesn't really matter. What you
    can look at is the size of the browser viewport itself:
    <URL:http://jibbering.com/faq/#FAQ4_9>
    (short summary:
    var width = (typeof window.innerWidth == "number")?window.innerWidth:
    (document.documentElement||document.body).clientWidth;
    )
    /L
    --
    Lasse Reichstein Nielsen -
    DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleDOM.html>
    'Faith without judgement merely degrades the spirit divine.'
     
    Lasse Reichstein Nielsen, Nov 24, 2003
    #2
    1. Advertising

  3. Re: Can the Favourites Sidebar (IE, Opera, etc.) be addressed selectively(exist or non-exist)?

    Markus Mohr wrote:

    > tonight I'm looking for a javascript piece of code which enables me to
    > detect whether the user's internet browser has a favourites sidebar
    > open and thus limits the "display space" of the adjacent table to a
    > certain width.


    Don't ever restrict the display of a table to a specific width
    which also means: Don't ever use tables for layout purposes.

    People are different, systems are different, user agents are
    different, display is different. The major advantage of HTML
    is it to adjust the flow of content to the display area
    automagically. So do not try to impose the opposite.


    PointedEars
     
    Thomas 'PointedEars' Lahn, Nov 25, 2003
    #3
  4. Markus Mohr

    Markus Mohr Guest

    On Tue, 25 Nov 2003 13:15:42 +0100, Thomas 'PointedEars' Lahn
    <> wrote:

    >Markus Mohr wrote:
    >
    >> [....]

    >
    >People are different, systems are different, user agents are
    >different, display is different. The major advantage of HTML
    >is it to adjust the flow of content to the display area
    >automagically. So do not try to impose the opposite.


    Fully agree, but the people had such a website based on tables, and
    now I have to cope with the same layout and display due to CI reasons.

    Furthermore, within the display per se (i. e. to table with the
    information to be shown), it is demanded to adjust the text relative
    to a background image wich must not interfere with the text (text on
    the left and image on the right) because it is too rich of contrast,
    thus the superimposed text would become illegible.

    I'm sorry, but these are not the conditions I have chosen.

    Sincerely


    Markus Mohr
     
    Markus Mohr, Nov 25, 2003
    #4
  5. Re: Can the Favourites Sidebar (IE, Opera, etc.) be addressed selectively(exist or non-exist)?

    Markus Mohr wrote:

    > On Tue, 25 Nov 2003 13:15:42 +0100, Thomas 'PointedEars' Lahn
    > <> wrote:


    Please shorten the attribution to one line, thanks.

    >> Markus Mohr wrote:
    >>
    >>> [....]

    >>
    >> People are different, systems are different, user agents are
    >> different, display is different. The major advantage of HTML
    >> is it to adjust the flow of content to the display area
    >> automagically. So do not try to impose the opposite.

    >
    > Fully agree, but the people had such a website based on tables, and
    > now I have to cope with the same layout and display due to CI reasons.


    Your main problem is *not* the Favorites sidebar but anything that
    forces the display area of the user to differ from that of the author.
    So the only thing you have to make sure is that the table does not
    extend the display width. Fortunately, CSS provides means for this
    which are also both more reliable and more efficient than JavaScript
    here (because the latter can be disabled in more UAs or not even being
    supported and, as I understand it, it requires more computing time):

    <table ... style="width:99%; max-width:99%">
    ...
    </table>

    YMMV.

    > Furthermore, within the display per se (i. e. to table with the
    > information to be shown), it is demanded to adjust the text relative
    > to a background image wich must not interfere with the text (text on
    > the left and image on the right) because it is too rich of contrast,
    > thus the superimposed text would become illegible.


    You cannot fix borken design neither with CSS nor with JavaScript. So if
    you want a design that results in adequate display for resizable display
    areas (which includes those restricted by sidebars) and/or different
    display resolutions, the design needs to be changed.

    > I'm sorry, but these are not the conditions I have chosen.


    Tough luck. Maybe you should venture to show your expert knowledge:
    Tell them that what they have done ignores the reality of the used
    medium (using other words, of course ;-)) and provide alternatives.
    Or, OTOH, you should drop the assignment. Anything else only gets
    you more in trouble.


    HTH

    PointedEars
     
    Thomas 'PointedEars' Lahn, Nov 26, 2003
    #5
  6. Markus Mohr

    Markus Mohr Guest

    On Wed, 26 Nov 2003 17:46:10 +0100, Thomas 'PointedEars' Lahn
    <> wrote:

    >Markus Mohr wrote:
    >
    >> On Tue, 25 Nov 2003 13:15:42 +0100, Thomas 'PointedEars' Lahn
    >> <> wrote:

    >
    >Please shorten the attribution to one line, thanks.
    >
    >>> Markus Mohr wrote:
    >>>
    >>>> [....]
    >>>

    >> I'm sorry, but these are not the conditions I have chosen.

    >
    >Tough luck. Maybe you should venture to show your expert knowledge:
    >Tell them that what they have done ignores the reality of the used
    >medium (using other words, of course ;-)) and provide alternatives.
    >Or, OTOH, you should drop the assignment. Anything else only gets
    >you more in trouble.


    True, but they stick to the CI conform design, and I have no other
    choice than to handle it this way. Unfortunetaly, the understanding of
    both design and coding functionality is not widespread in this
    company, so that I haven't got anyone to share my point of view.

    But I have solved the problem in another way: letting the text flow
    around the right-aligned image as simple HTML statement, and
    apparently everybody seems to be happy with it (apart from myself).

    Sincerely and thank you


    Markus
     
    Markus Mohr, Nov 27, 2003
    #6
  7. Markus Mohr

    Markus Mohr Guest

    On Tue, 25 Nov 2003 00:02:57 +0100, Lasse Reichstein Nielsen
    <> wrote:

    >Markus Mohr <> writes:
    >
    >> tonight I'm looking for a javascript piece of code which enables me to
    >> detect whether the user's internet browser has a favourites sidebar
    >> open

    >
    >Mine doesn't. Mostly because it has no favorites sidebar, it's called
    >a Hotlist in Opera.


    Yes, you're right, mine as well, but the people who were disturbed by
    what they saw, of course and obviously, only had the IE at hand ....

    >> Is there any way to detect whether the favourites sidebar is open, and
    >> of which width it is?

    >
    >Not that I know of. But as I said, it doesn't really matter. What you
    >can look at is the size of the browser viewport itself:
    ><URL:http://jibbering.com/faq/#FAQ4_9>
    >(short summary:
    > var width = (typeof window.innerWidth == "number")?window.innerWidth:
    > (document.documentElement||document.body).clientWidth;


    Very good hint, thank you. But meanwhile I had to solve the problem in
    a different way (simply letting the text flow around the image in a
    HTML way), and all of a sudden even the most sceptical minds seem to
    be satisfied.

    Thank you very much for your help,


    Markus Mohr
     
    Markus Mohr, Nov 27, 2003
    #7
  8. Re: Can the Favourites Sidebar (IE, Opera, etc.) be addressed selectively(exist or non-exist)?

    Markus Mohr wrote:

    > But I have solved the problem in another way: letting the text flow
    > around the right-aligned image as simple HTML statement, and
    > apparently everybody seems to be happy with it (apart from myself).


    Fine. One more thing: HTML is a markup language, not a programming
    language. HTML has elements, composed of tags, having attributes
    having values. It has no statements.

    > Sincerely and thank you


    You are welcome.


    PointedEars
     
    Thomas 'PointedEars' Lahn, Nov 28, 2003
    #8
    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. Mark
    Replies:
    2
    Views:
    4,161
    =?Utf-8?B?Q2xldHVzIFZhbiBEYW1tZQ==?=
    Jul 24, 2004
  2. Kevin Walzer

    Re: PIL (etc etc etc) on OS X

    Kevin Walzer, Aug 1, 2008, in forum: Python
    Replies:
    4
    Views:
    456
    Fredrik Lundh
    Aug 13, 2008
  3. Simon Wigzell

    javascript to call "Add to favourites"

    Simon Wigzell, Aug 22, 2003, in forum: Javascript
    Replies:
    1
    Views:
    87
    steve stevo
    Aug 23, 2003
  4. Joe Patrick

    Favourites & Homepage

    Joe Patrick, Sep 10, 2003, in forum: Javascript
    Replies:
    0
    Views:
    86
    Joe Patrick
    Sep 10, 2003
  5. mbisping

    create non-sidebar bookmarks in Firefox?

    mbisping, Sep 4, 2007, in forum: Javascript
    Replies:
    5
    Views:
    144
Loading...

Share This Page