User alert
var _gPageLoadCalled = null;
var alertWidth = 400;
var alertHeight = 244;
var _gAlertFocusItem = null;
function onPublisherRegistered()
{
onLoad();
}
function onLoad()
{
if (window &&
window.external &&
window.external.UIShowWindow &&
!_gPageLoadCalled)
{
_gPageLoadCalled = true;
alertElement = document.getElementById("alert");
if (alertElement)
{
alertWidth = document.body.clientWidth;
alertHeight = document.body.clientHeight + document.body.offsetTop + 15;
}
if (alertWidth && alertHeight)
{
if (alertWidth > 0 && alertHeight > 0)
{
window.external.UIResizeWindow(alertWidth, alertHeight);
// TODO: Add hidden element after BUTTON3 and resize
// window preserving aspect ratio until hidden element top
// coordinate is contained within window.
}
}
window.external.UISetWindowTitle("[AlertWindowTitle]");
window.external.UIShowWindow(1);
if (document.forms && document.forms[0] && document.forms[0][0])
{
document.forms[document.forms.length-1][document.forms[document.forms.length-1].length-1].focus();
}
}
}
function onButtonBlur(ev)
{
_gAlertFocusItem = null;
}
function onSubmit()
{
if (_gAlertFocusItem && _gAlertFocusItem.type == "button")
_gAlertFocusItem.onclick();
}
function setFocus(inInput)
{
_gAlertFocusItem = inInput;
return true;
}
[AlertTitle]
[AlertBody]
[AlertButtons]
Wyszukiwarka
Podobne podstrony:
alert buttonalertAlert Solo 250 EWQQE Alert v1 Instructionsn v lv alertalertAdult Alert 002val no alertname alertoption focus alerttop alertwięcej podobnych podstron