File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes HTML, CSS and JavaScript and the fly likes Determine taskbar position in javascript Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Determine taskbar position in javascript" Watch "Determine taskbar position in javascript" New topic
Author

Determine taskbar position in javascript

Amit Ghai
Ranch Hand

Joined: Mar 24, 2004
Posts: 35
I would like to determine the location/position of taskbar to position my maximized window. I have been able to get the width and height available in IE using the sceen.availHeight and sceen.availWidth. I would like to position the window relative to the position of taskbar. Please suggest if there is a way to determine the location of taskbar in javascript in IE.


Reasonable people adapt themselves to the world. Unreasonable people attempt to adapt the world to themselves. All progress, therefore, depends on unreasonable people.
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
I am not sure what you are after. Determine the position? You mean if it is on the top/bottom/left/or right? How about mine on which is hidden?

Eric
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60059
    
  65

What makes you assume everyone is using Windows? Good luck trying to find out where my OS X Dock is positioned.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

With Gnome, they're called panels and you can have more than one.


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
Amit Ghai
Ranch Hand

Joined: Mar 24, 2004
Posts: 35
The application is being built for an elite class of users. We can safely assume that the OS is windows and browser is IE as this is the desired configuration for end user.
I would like to know in javascript, whether the taskbar is positioned at left/right/top/bottom so as to reposition the maximized window. The window is maximized so that the browser back/forward button is not visible to the end user. We have ajax calls and the back/forward can mess up things.
The only issue im facing right now is that although I get the available screen height and width left after the space taken by taskbar(using screen.availableHeight and screen.availableWidth), but the position of the taskbar is not known. Hence if I position it at 0,0 I cover only the bottom and the right positioning of the taskbar. In case the taskbar is at the top or left position, a part of the application gets hidden behind the task bar.

Please suggest. Thanks in advance.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60059
    
  65

Originally posted by Amit Ghai:
... an elite class of users ... the OS is windows and browser is IE

snort

In any case, this is not something you can discover.
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
You guys are attacking the solution to the problem the wrong way.

First, current day browsers normally do not let you move the window off the screen because pop up ads used to do it so you could not close their ads.

Second, I use navigation with my keyboard. I never touch the back and forward buttons on the browser. I am sure other people do that too.

You really need to sit down and learn how to implement forward and back buttons into you Ajax application. You also have to worry about right click with forward and back. Disabling right click means you take away copy and paste. Not good.

It is possible to actually get the back and forward buttons to work if you spend some time on it. Look into Really Simple History, it gives you a framework to build page history into your Ajax aplication.

Eric
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Determine taskbar position in javascript
 
Similar Threads
When click on minimize button then it must goes to System Tray?
Stand alone window in jsp
IE alternative to netscape Window.pageXOffset?
Popup Window Position
Flashing an update