Class WindowManager
Object
|
+--WindowManager
- class
WindowManager
This class provides utility methods related to the current browser window. A static object of this class
is avaialable with name WinMgr
.
var WinMgr = new WindowManager();
Defined in Common.js
Field Summary |
Object |
currentWinId
|
boolean |
isGecko
true means the current browser is Gecko |
boolean |
isIE
true means the current browser is Internet Explorer |
boolean |
isOpera
true means the current browser is Opera |
Method Summary |
void
|
close(pageName)
Saves the windows position and dimensions to the cookie and closes the current browser window.
|
Object
|
expireCookie(name, domain, path)
Expires the specified cookie
|
String
|
getCookie(name)
Returns the value of the specified cookie
|
String
|
getRequestParam(parmName, defValue)
Returns the value of the specified request parameter.
|
window Object
|
openWindow( props )
Opens a new Popup window with the specified parameters.
|
Object
|
setCookie(name, value, minutes, domain, path, secure)
Sets a cookie.
|
currentWinId
Object currentWinId
isGecko
boolean isGecko
true
means the current browser is Gecko
isIE
boolean isIE
true
means the current browser is Internet Explorer
isOpera
boolean isOpera
true
means the current browser is Opera
WindowManager
WindowManager()
close
void close(pageName)
Saves the windows position and dimensions to the cookie and closes the current browser window.
Parameters:
pageName
- The name of the current page. This parameter will be used as the cookie key to save the current top, left, width, height values of the active window. If omitted then no saving is done.
expireCookie
Object expireCookie(name, domain, path)
Expires the specified cookie
getCookie
String getCookie(name)
Returns the value of the specified cookie
getRequestParam
String getRequestParam(parmName, defValue)
Returns the value of the specified request parameter.
Parameters:
parmName
- The name of the request parameter
defValue
- The value to return in case of the specified parameter is missing in the request
openWindow
window Object openWindow( props )
Opens a new Popup window with the specified parameters.
Parameters:
props
- The property array that contains the function parameters in {prop1:"Value1", prop2:"Value2"}
format. - prop.url - Either a UrlAddress object or a url string.
- prop.winId - An identity for the popup window. For the calls that have the same winId, the same popup window is used. If a window is already open it is replaced with new content.
- prop.left - The distance on the left of the window. If not defined the window is aligned vertically on the center.
- prop.top - The distance on the top of the window. If not defined the window is aligned horizontally on the middle.
- props.toolbar - Toolbar is visible
- props.scrollbars - Scroolbars are visible
- props.location - URL location is visible
- props.status - Status bar is visible
- props.menubar - Menubar is visible
- props.resizable - Window is resizable
- props.status - Status bar is visible
Example:
WinMgr.openWindow({
url:"/NewWindow/PopUp", height:400, width:700,
scrollbars:true, toolbar:true, menubar:true, resizable:true,
status:true, location:true, resizeable:true,
top:50, left:50 });
Returns:
The handle of the new popup window
setCookie
Object setCookie(name, value, minutes, domain, path, secure)
Parameters:
minutes
- The life of the cookie in minutes
domain
- The domain string
Copyright 2002 - 2008, MOR YAZILIM
Documentation generated by
JSDoc on Mon Sep 29 14:52:55 2008