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

Monday, July 14, 2008

Javascript: Open in iFrame

In div
style="position:absolute;display:none;background-color:white;border:solid 1px gray;border-style:double; z-index:100;"

in javascript
function showdiv(obj, bState, left, top) {
var oDiv = obj;
/*@cc_on @if (@_jscript_version >= 5)
try {
var oIframe = document.getElementById('HelpFrame');
oIframe.scrolling = 'no';
} catch (e) {
var oIframe = document.createElement('iframe');
var oParent = oDiv.parentNode;
oIframe.id = 'HelpFrame'; oParent.appendChild(oIframe);
}

oIframe.frameborder = 0;
oIframe.style.filter='Alpha(Opacity=80)';
oIframe.style.position = 'absolute';
oIframe.style.top = top;
//oIframe.style.left = left;
oIframe.style.display = 'none'; @end @*/
if (bState) {
oDiv.style.margin = "0px";
oDiv.style.padding = "0px";
oDiv.style.top = top;
//oDiv.style.left = left;
oDiv.style.display = 'block';
/*@cc_on @if (@_jscript_version >= 5)
oIframe.style.top = oDiv.style.top;
oIframe.style.left = oDiv.style.left;
oIframe.style.zIndex = oDiv.style.zIndex - 1;
oIframe.style.width = parseInt(oDiv.offsetWidth);
oIframe.style.height = parseInt(oDiv.offsetHeight);
oIframe.style.visibility = "visible";
oIframe.style.display = 'block'; @end @*/
} else {
/*@cc_on @if (@_jscript_version >= 5)
oIframe.style.display = 'none'; @end @*/
oDiv.style.display = 'none'; }
}

No comments: