Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Detecting scrollbars
Message
Information générale
Forum:
Internet
Catégorie:
Javascript
Divers
Thread ID:
00647124
Message ID:
00647148
Vues:
21
>>>>Not tested, but must work:
>>>>
>>>>Test the document.body.scroll property to know if scrollbar are on or off
>>>>and, if on, compare the document.body.scrollHeight (visible area)
>>>>with the document.body.clientHeight (window or frame height).
>>>
>>>It doesn't work when the window has been created with window.open(). That's the only think I can see.
>>
>>Can you explain a bit more what you are trying to do?
>
>With a window that is created with window.open(), I need to know, within the script of that new window, if a scrollbars is present.
>
>So, from this window for example, I may use the Tools menu to select the color. The color window has been launched with window.open(). That new window runs a script to center itself and stuff like that. From that script, I need to know it.

I dont know how to get this info. :-(

But since the width of a scrollbar was around 20 px, you can average your calculation to 10 px to set the window really near the center of the screen...
If we exchange an apple, we both get an apple.
But if we exchange an idea, we both get 2 ideas, cool...


Gérald Santerre
Independant programmer - internet or intranet stuff - always looking for contracts big or small :)
http://www.siteintranet.qc.ca
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform