05-20-2009 07:42 AM
How to get the Browser Height and Width in Blackberry Bold through java script?
Thanks,
Navaneeth
05-20-2009 08:45 AM
Hello
Have you tried
screen.availWidth
screen.availHeight
These are the properties of the screen object.
availHeight int Returns the height of the BlackBerry device screen that is available to the BlackBerry®
Browser, in pixels. This may be equal to or less than the value of Screen.height.
read only
availLeft int Returns the screen space available to the left of the browser window. In the case of the
BlackBerry Browser, this property always returns a value of “0”.
read only
availTop int Returns the screen space available above the browser window. In the case of the
BlackBerry Browser, this property always returns a value of “0”.
read only
availWidth int Returns the width of the BlackBerry device screen that is available to the BlackBerry
Browser, in pixels. This may be equal to or less than the value of Screen.width.
read only
colorDepth int Returns the bit depth of the color palette. This property behaves identically to the
pixelDepth property.
read only
height int Returns the height of the BlackBerry device screen, in pixels. read only
pixelDepth int Returns the color resolution, in bits per pixel, of the display. read only
width int Returns the width of the BlackBerry device screen, in pixels. read only
Cheers
Andrew
07-08-2009 02:25 PM
Hi I am trying to get this working exactly how you have recomended but the script is crashing.
have you tryed to use it?
document.write("resWidth: " + screen.availWidth + " resHeight:" + screen.availHeight);
thanks.
07-08-2009 02:26 PM
07-14-2009 12:15 AM