I have div.js which is for popup in this i define 2 function
getPageSize(); and getPageScroll();
and other file a.php and b.php in a.php as below
<script language=Javascript>
function divOn (aId_task)
{
var arrayPageSize = getPageSize();
var arrayPageScroll = getPageScroll();
//bgrnd4 = '<div style="position:absolute; top:0; left:0; width:100%; height:100%; z-index:300; background-color:#000000; -moz-opacity: 0.6; opacity:.60; filter: alpha(opacity=60);" id=overlay></div>';
//bgrnd4 = '<div style="position:absolute; top:0; left:0; width: ' + arrayPageSize[0] + '; height:' + arrayPageSize[1] + '; z-index:300; background-color:#000000; -moz-opacity: 0.6; opacity:.60; filter: alpha(opacity=60);" id="overlay"></div>';
bgrnd4 = '<div style="position:absolute; top:0; left:0; width: 100%; height:' + arrayPageSize[1] + '; z-index:300; background-color:#000000; -moz-opacity: 0.6; opacity:.60; filter: alpha(opacity=60);" id="overlay"></div>';
document.getElementById("div_popup").innerHTML = bgrnd4;
var objFlash = document.getElementById('divek');
objFlash.style.visibility = "visible";
objFlash.style.display = 'block';
objFlash.style.border = "6px solid #4874CD";
objFlash.style.zIndex = 301;
objFlash.style.position= "absolute";
objFlash.style.backgroundColor = "#ffffff";
x = '';
x = x + '<table border=0 cellspacing=0 cellpadding=5 width=100%><tr><td align=right>'
x = x + '<a style="cursor: pointer;" onclick="divOff(); return false;">x<b> close</b></a>';
x = x + '<b> </b>';
x = x + '</td></tr></table>';
x = x + '<iframe name=iframe4 id=iframe4 width=600 height=477 frameborder=0 marginheight=8 marginwidth=8 scrolling=auto></iframe>';
objFlash.innerHTML = x;
var arrayPageSize = getPageSize();
var arrayPageScroll = getPageScroll();
// center loadingImage if it exists
if (objFlash)
{
objFlash.style.position = 'absolute'; //???
// objFlash.style.top = (((arrayPageSize[3] - 35 - 440) / 2) + 'px');
// objFlash.style.left = (((arrayPageSize[0] - 20 - 600) / 2) + 'px');
// objFlash.style.width = '600';
// objFlash.style.height = '500';
objFlash.style.top = (((arrayPageScroll[1]) / 1)+50 + 'px');
objFlash.style.left = (((arrayPageSize[0] - 20 - 600) / 2) + 'px');
objFlash.style.width = '600';
objFlash.style.height = '500';
// objFlash.style.zIndex = '90';
// objFlash.style.display = 'block';
}
var start = new Date();
var randomnumber=Math.floor(Math.random()*30000);
xtime = start.getTime();
dummyvar = xtime + randomnumber;
xUrl = "b.php?dummy=" + dummyvar + "&Id=" + aId_task;
document.getElementById('iframe4').src = xUrl;
}
function divOff()
{
document.getElementById("div_popup").innerHTML = "";
// document.getElementById("divek").display = "";
document.getElementById("divek").style.visibility = "hidden";
xUrl = "";
document.getElementById('iframe4').src = xUrl;
}
</script>
And b.php will shows some data regarding id.
Now my question is :- How to call this function in a.php file so that it will show b.php as a popup in same window.
Is here any help...