Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Determine taskbar position in javascript

 
Amit Ghai
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 64633
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What makes you assume everyone is using Windows? Good luck trying to find out where my OS X Dock is positioned.
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
With Gnome, they're called panels and you can have more than one.
 
Amit Ghai
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 64633
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic