Sun Application Server Startup Command: /opt/SUNWappserver/bin/asadmin start-domain --domaindir /opt/SUNWappserver/domains --user admin

Wednesday, July 23, 2008

Javascript: Overwrite layer

<style>

.select-free
{
position:absolute;
z-index:10;
cursor:move;

overflow:hidden;/*must have*/
width:33em;/*must have for any value*/;

}
.select-free iframe
{
display:none;/*sorry for IE5*/
display/**/:block;/*sorry for IE5*/
position:absolute;/*must have*/
top:0;/*must have*/
left:0;/*must have*/
z-index:-1;/*must have*/
filter:mask();/*must have*/
width:3000px;/*must have for any big value*/
height:3000px/*must have for any big value*/;
}

.select-free .bd{
border:solid 0px #000000;padding:0px;

}
#dd1{
BORDER-RIGHT: #000000 2px solid;
BORDER-TOP: #000000 2px solid;
MIN-HEIGHT: 90px;
BORDER-LEFT: #000000 2px solid;
WIDTH: 300px;
BORDER-BOTTOM: #000000 2px solid;
background-color: #F4F1D9

}

.closeBtn {
BORDER-RIGHT: #000000 2px solid;
PADDING-RIGHT: 3px;
BORDER-TOP: #000000 2px solid;
DISPLAY: block;
PADDING-LEFT: 3px;
MARGIN-BOTTOM: 10px;
PADDING-BOTTOM: 3px;
FONT: 0.7em verdana,arial;
MARGIN-LEFT: 112px;
TEXT-TRANSFORM: uppercase;
BORDER-LEFT: #000000 2px solid;
WIDTH: 70px;
COLOR: #ffffff;
PADDING-TOP: 3px;
BORDER-BOTTOM: #000000 2px solid;
POSITION: relative;
BACKGROUND-COLOR: #8b070f;
TEXT-ALIGN: center;
TEXT-DECORATION: none
}


#dd2{left:0px;top:0px;color:white;border:none;}
#dd2 .bd{padding:0;border:none;}
#dd2 .bd * {;color:#FFFFFF;border:solid 0px #000000;padding:1px;margin:0}

#dd2{
*zoom:1;
*background:none;
*filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#4b000000,endColorstr=#4b000000);
background:transparent url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAMAAAAoyzS7AAADAFBMVEUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAhTh5BAAAAA1JREFUeAEBAgD9/wAAAAIAAX4FDdIAAAAASUVORK5CYII=);
}

</style>

<script>


function alertbox(txt) {

var alertDivObj = null;
if (document.getElementById('alertDiv')==null) {
alertDivObj = document.getElementsByTagName("body")[0].appendChild(document.createElement("div"));
alertDivObj.id='alertDiv';
}

if (document.getElementById('alertDiv')!=null) {
alertDivObj = document.getElementById('alertDiv');
alertDivObj.innerHTML=alertBackground() + alertContent(alertTitle(txt), txt);

var alertObj = document.getElementById('dd2');
alertObj.style.width = document.body.offsetWidth;
alertObj.style.height = document.body.offsetHeight;

// display alert box
var point = getCenterPosition();
var alertObj = document.getElementById('dd1');
alertObj.style.left = point.x;
alertObj.style.top = point.y;

}
return false;
}

function alertTitle(txt) {
if (txt=="Please indicate RAP or SUP" || txt=="Please indicate EIN or SSN")
{
return ALERT_TITLE2;
} else {
return ALERT_TITLE;
}
}


function alertContent(title, txt) {
var content = '';
//content += '<div id="modalContainer" class="modalContainer">'
content += '<div class="select-free" id="dd1"><div class="bd">'
content += '<TABLE width="300"';
content += 'ALIGN="left" BORDER=0 CELLSPACING=1 CELLPADDING=2>';
content += '<TR ALIGN="left" VALIGN="top" class="alertBoxTr">'
content += '<td colspan=2>'+ALERT_TITLE+'</td>';
content += '</TR>';
content += '<TR ALIGN="left" VALIGN="top">'
content += '<td valign="middle"><img src="images/error2.png" border="0"></td>';
content += '<td><font size=2>' + txt + '</td>';
content += '</TR>';
content += '<TR ALIGN="left" VALIGN="top">'
content += '<td colspan=2 ><input type="button" value="'+ALERT_BUTTON_TEXT+'" class="closeBtn" onclick="removeDiv()" onkeypress="removeDiv()"></td>';
content += '</TR>';
content += '</TABLE>';
content += '</div><!--[if lte IE 6.5]><iframe></iframe><![endif]--></div>';
//content += '</div>';
return content;
}

function alertBackground() {
var content='';
content += '<div class="select-free" id="dd2"><div class="bd">';
content += ' ';
content += '</div><!--[if lte IE 6.5]><iframe></iframe><![endif]--></div>';
return content;

}

function getCenterPosition() {
var point = new Object();
point.x = 0;
point.y = 0;
if (parseInt(navigator.appVersion)>3) {
if (navigator.appName=="Netscape") {
point.x = (window.innerWidth/2) - 100;

point.y = window.innerHeight/2;
}
if (navigator.appName.indexOf("Microsoft")!=-1) {
point.x = (document.body.offsetWidth/2) - 100;
point.y = document.body.offsetHeight/2;
}
}
if (point.x<0) {
point.x = 0;
}
return point;

}
</script

No comments: