Forums
This topic is locked
Detecting browser window size
Posted 10 Jan 2002 20:36:18
1
has voted
10 Jan 2002 20:36:18 Owen Eastwick posted:
I have set up a page with a table centered both virtically and horizontally. I now wish to have a DHTML scrolling layer in a fixed position relative to this table. So regardless of what size the user opens their browser the scrolling layer is in it's correct position above the centered table.I have the scrolling layer working corectly, however its position is determined with the following parameters:
(pixels_from_top, pixels_from_left, layer_height, layer_width, "document_to_open_in_layer.htm"
So I need to dynamically allocate the pixels_from_top and pixels_from_left parameters, OK no problem but to further complicate things I wish these to be updated if the user resizes the browser window and as it's done, to ensure that the layer is always in its correct position.
My first question - is it possible to determine the browser width and height dynamically, so that these values are updated as the user resizes the browswer window?
My second question is tougher - if so, how?
Any information, links to articles or book recommendations you can provide will be very gratefully received.
Regards
Owen.
Multiple Parameter UD4 / Access 2000 Database Search Tutorial:
www.tdsf.co.uk/tdsfdemo
Replies
Replied 29 Jan 2002 12:31:47
29 Jan 2002 12:31:47 Marja Ribbers-de Vroed replied:
Surf to www.projectseven.com and check out their SnapLayer extension.
Regards,
--
--
Marja Ribbers-de Vroed
www.ribbers-zeewolde.nl/dreamweaver/
Regards,
--
--
Marja Ribbers-de Vroed
www.ribbers-zeewolde.nl/dreamweaver/
Replied 29 Jan 2002 14:01:28
29 Jan 2002 14:01:28 Owen Eastwick replied:
Thanks for the tip.
I've kind of resolved this issue.
The idea was that I could have a scrolling layer that would work in Netscape 4. and it did - kind of.
Worked perfectly in IE but if the user resized the browser smaller than the scrolling layer in Netscape 4, the javascrpt would go into a loop and crash the browser.
So rather than usig about 200 lines of javascript to calculate the position and generate a scrolling layer, I've scrapped it and used <iframe> - 1 line. Netscape 4 users are detected and redirected to a simplified copies of the scrolling layer pages.
Read my site stats the other day and saw with horror that 30% of visitors last month were using Netscape 4, when will that browser die?
Regards
Owen.
Multiple Parameter UD4 / Access 2000 Database Search Tutorial:
www.tdsf.co.uk/tdsfdemo
I've kind of resolved this issue.
The idea was that I could have a scrolling layer that would work in Netscape 4. and it did - kind of.
Worked perfectly in IE but if the user resized the browser smaller than the scrolling layer in Netscape 4, the javascrpt would go into a loop and crash the browser.
So rather than usig about 200 lines of javascript to calculate the position and generate a scrolling layer, I've scrapped it and used <iframe> - 1 line. Netscape 4 users are detected and redirected to a simplified copies of the scrolling layer pages.
Read my site stats the other day and saw with horror that 30% of visitors last month were using Netscape 4, when will that browser die?
Regards
Owen.
Multiple Parameter UD4 / Access 2000 Database Search Tutorial:
www.tdsf.co.uk/tdsfdemo
Replied 30 Jan 2002 19:55:58
30 Jan 2002 19:55:58 Tony Chronopoulos replied:
Wow, 30% of your users were using netscape? If you don't mind me asking, 30% of how many?
Replied 30 Jan 2002 22:06:34
30 Jan 2002 22:06:34 Owen Eastwick replied:
This months Site stats even worse, the "Netscape 4.0 appreciation society" must have made my site there home page: <img src=../images/dmxzone/forum/icon_smile_big.gif border=0 align=middle>
Analysis for the Month of Jan, 2002.
Total sessions served during period : 2308
Most active browsers by type and version:
MSIE 5.x with 936 sessions (40.50% of all sessions)
Netscape 4.x with 908 sessions (39.29% of all sessions)
Unknown with 132 sessions (5.71% of all sessions)
MSProxy 2.x with 121 sessions (5.24% of all sessions)
AOL 4.x with 100 sessions (4.33% of all sessions)
Netscape 3.x with 66 sessions (2.86% of all sessions)
Netscape 5.x with 20 sessions (0.87% of all sessions)
MSIE 4.x with 11 sessions (0.48% of all sessions)
AOL 5.x with 8 sessions (0.35% of all sessions)
Opera 3.x with 8 sessions (0.35% of all sessions)
MSIE 3.x with 1 sessions (0.04% of all sessions)
Some of these will have been me checking test stuff in sub directories in old browsers that I have installed but this would only account for a handfull of sessions. I've ad a look around at a couple of sites that publish browser stats and they all seem to agree that the average is somewhere in te region of 10-15%. Beats me why I seem to be getting so many NN 4.x users.
Regards
Owen.
Multiple Parameter UD4 / Access 2000 Database Search Tutorial:
www.tdsf.co.uk/tdsfdemo
Edited by - oeastwick on 30 Jan 2002 22:24:09
Analysis for the Month of Jan, 2002.
Total sessions served during period : 2308
Most active browsers by type and version:
MSIE 5.x with 936 sessions (40.50% of all sessions)
Netscape 4.x with 908 sessions (39.29% of all sessions)
Unknown with 132 sessions (5.71% of all sessions)
MSProxy 2.x with 121 sessions (5.24% of all sessions)
AOL 4.x with 100 sessions (4.33% of all sessions)
Netscape 3.x with 66 sessions (2.86% of all sessions)
Netscape 5.x with 20 sessions (0.87% of all sessions)
MSIE 4.x with 11 sessions (0.48% of all sessions)
AOL 5.x with 8 sessions (0.35% of all sessions)
Opera 3.x with 8 sessions (0.35% of all sessions)
MSIE 3.x with 1 sessions (0.04% of all sessions)
Some of these will have been me checking test stuff in sub directories in old browsers that I have installed but this would only account for a handfull of sessions. I've ad a look around at a couple of sites that publish browser stats and they all seem to agree that the average is somewhere in te region of 10-15%. Beats me why I seem to be getting so many NN 4.x users.
Regards
Owen.
Multiple Parameter UD4 / Access 2000 Database Search Tutorial:
www.tdsf.co.uk/tdsfdemo
Edited by - oeastwick on 30 Jan 2002 22:24:09