Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to capture the event when a popup window box is resize

Status
Not open for further replies.

jadeite100

Programmer
May 17, 2006
19
0
0
CA
Hi:

I am using IE 6 SP2.
I have the following javascript function that is call when the popup window is created.
<html>
<head>
<script language="JavaScript">
function shrinkIFrame() {

}
</head>
<body onLoad="shrinkIFrame();">

</body>
</html>
When I resize the popup window how can I triggered the javascript function called "shrinkIFrame".

Basically, I needed to be notified that the window is being resize than I can called the javascript function shrinkIFrame.

Yours,

Frustrated.
 
Hi

Code:
<html>
<head>
<script type=text/javascript">
function shrinkIFrame() {

}
[red]window.onresize=shrinkIFrame;[/red]
</script>
</head>
<body onLoad="shrinkIFrame();">

</body>
</html>

Feherke.
 
Hi:

Thank for the answer. The above code works as advised by you. But unfortunately when I used with the full code when I resize the window the onresize event doesnot get triggered. I read on the web that the window object is sometimes not available when use with certain html.

Is there another way to be able to call a javascript function when a window is resized?

Here is my actual html page:




























<script language="javascript">
// Popup only one window
function openSamePopup(url, name, h, w)
{
windowprops = "height=" + h + ",width=" + w + ",location=no,scrollbars=yes,menubars=no,toolbars=no,resizable=yes,top=0,left=20";
var popwin = window.open(url, name, windowprops,true);
//alert(popwin.location.pathname);
//above window.open(url,name,features,replace), replace=true maybe not work on some browser, so force to replace again
popwin.location.replace(url);

}
</script>
















<html lang="en">
<HEAD>
<base href="<LINK rel="stylesheet" type="text/css" href="/inquiry/jsp/common/stylesheet.css">
<LINK rel="stylesheet" type="text/css" href="/inquiry/jsp/common/stylesheet_print.css" media="print">
<script language="JavaScript1.2" src="/inquiry/jsp/common/coolmenus4.js">

</script>

<script language="JavaScript">

debugger;
window.onresize = shrinkIFrame;

function shrinkIFrame()
{
debugger;
alert("Inside shrinkIFrame()");
}
//alert("the iFrame is now" + theFrame.offsetHeight + " high and " + theFrame.offsetWidth + " wide");


function readjustIframe(loadevt) {

var crossevt=(window.event)? event : loadevt
var iframeroot=(crossevt.currentTarget)? crossevt.currentTarget : crossevt.srcElement
if (iframeroot)
{
//alert("readjustIframe,iframeroot.id:"+iframeroot.id);
resizeIframe(iframeroot.id);

}
}

</script>
<title>
albert Inquiry - View albert History
</title>
</HEAD>

<body onLoad="shrinkIFrame();" bgcolor="#FFFFFF" text="#000000" link="#0066CC" vlink="#0066CC" alink="#0066CC" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<table width="100%" border="0" cellspacing="0" cellpadding="0" height="100%">
<tr>
<td height="50" valign="top">

<script language="JavaScript1.2" src="/inquiry/jsp/common/scripts.js"></script>
<script language="JavaScript1.2" src="/inquiry/jsp/common/fixed-header-table.js"></script>


<div ID="Header2" class="screen">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="100"><img src="/inquiry/images/albertestlogo.gif" width="100" height="50"></td>
<td width="5" background="/inquiry/images/logo_divider.gif"><img src="/inquiry/images/spacer.gif" width="5" height="1"></td>
<td width="100%" align="right" valign="bottom" bgcolor="#1D4E3B">
<table border="0" cellspacing="0" cellpadding="0" width="79">
<tr>
<td align="right"><span style="cursor:help"><a href="javascript:eek:penPopup('/inquiry/html/webhelp/inquiry user manual.pdf', '600','800')" ;return true"><img src='/inquiry/images/help.gif' width="39" height="17" name="help" alt='Help' border="0" onMouseOver="help.src='/inquiry/images/help-over.gif'; window.status='Help';return true" onMouseOut="help.src='/inquiry/images/help.gif';window.status='';return true"></a></span></td>
<td><img src='/inquiry/images/close.gif' width="40" height="17" name="close" alt='Close' border="0" onMouseOver="close.src='/inquiry/images/close-over.gif';window.status='Close';return true" onMouseOut="close.src='/inquiry/images/close.gif';window.status='';return true" onClick="window.close()"></td>
</tr>
</table>
</td>
<td width="200" bgcolor="#1D4E3B"><img src='/inquiry/images/title_en.gif' width="200" height="50"></td>
</tr>
</table>
</div>
<div class="print">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="100"><img src="/inquiry/images/albertestlogo.gif" width="100" height="50"></td>
<td class="heading">albertest Inquiry</td>
</tr>
</table>
</div>





<!-- //start primary table - primary menu level -->
<div ID="navPrimaryMenu" class="screen">
<!-- <script language="JavaScript1.2" src="/inquiry/jsp/common/menu.js"></script> -->
<script language="JavaScript">
oM=new makeCM("oM");
oM.resizeCheck=1; //rebuild menu on browser resize - needed for NN4
oM.rows=1; //1 for horizontal menu, 0 for vertical
oM.onlineRoot=""; //URL location of root server ex:/pep/inquiry/
oM.offlineRoot="file:///"; //URL location of root when offline(local)
oM.pxBetween=0; //distance between top level items
oM.fillImg="/images/spacer.gif";
oM.fromTop=51; //background bar - from top of page
oM.fromLeft=0; //background bar - from left side of page
oM.wait=300; //how long submenu is visible
oM.zIndex=400;
//oM.menuPlacement=0; //top level items displayed side-by-side
var avail="(cmpage.x2/7)";
oM.menuPlacement=new Array(0,avail+"*1-10",avail+"*2-20",avail+"*3-30",avail+"*4-40",avail+"*5-50",avail+"*6-60", avail+"*7-70")

oM.useBar=1;
oM.barWidth="100%";
oM.barHeight="menu";
oM.barX="menu";
oM.barY="menu";
oM.barClass="clBar";
oM.barBorderX=1;
oM.barBorderY=1;
oM.barBorderClass="clBarBorder";
oM.level[0]=new cm_makeLevel(70,18,"clT","clTover",1,1,"clB",1,"bottom",0,0,0,0,0);
oM.level[1]=new cm_makeLevel(100,19,"clS","clSover",1,1,"clB",0,"bottom",0,0,"/images/menu_arrow.gif",10,10);
</script>

<script language="JavaScript">
oM.makeMenu('p1000','','Member','','','60');
oM.makeMenu('','p1000','Claim History','/inquiry/menuInit.do?menuChoice=claimHistory','','100');
oM.makeMenu('','p1000','Members','/inquiry/menuInit.do?menuChoice=cardholder','','90');
oM.makeMenu('','p1000','Limits','/inquiry/menuInit.do?menuChoice=cardLimit','','85');
oM.makeMenu('','p1000','Exceptions','/inquiry/menuInit.do?menuChoice=cardException','','110');
oM.makeMenu('','p1000','Audit Claim','/inquiry/menuInit.do?menuChoice=auditClaimHistory','','120');
oM.makeMenu('p2000','','Service','','','60');
oM.makeMenu('','p2000','Drug','/inquiry/menuInit.do?menuChoice=drugInfo','','50');
oM.makeMenu('','p2000','Din Plan','/inquiry/menuInit.do?menuChoice=dinPlan','','70');
oM.makeMenu('','p2000','DinPrice','/inquiry/menuInit.do?menuChoice=dinPrice','','70');
oM.makeMenu('','p2000','Din Matrix','/inquiry/menuInit.do?menuChoice=dinMatrix','','70');
oM.makeMenu('p3000','','Group','','','50');
oM.makeMenu('','p3000','Summary - Drug','/inquiry/menuInit.do?menuChoice=group','','60','30');
oM.makeMenu('','p3000','Drug Profile','/inquiry/menuInit.do?menuChoice=groupProfile','','45','30');
oM.makeMenu('','p3000','Parameters','/inquiry/menuInit.do?menuChoice=groupParameter','','70','30');
oM.makeMenu('','p3000','Exceptions','/inquiry/menuInit.do?menuChoice=groupException','','70','30');
oM.makeMenu('','p3000','Preferred Providers','/inquiry/menuInit.do?menuChoice=groupPreferredProvider','','65','30');
oM.makeMenu('','p3000','Notes','/inquiry/menuInit.do?menuChoice=groupNote','','45','30');
oM.makeMenu('','p3000','Thresholds','/inquiry/menuInit.do?menuChoice=groupThreshold','','70','30');
oM.makeMenu('','p3000','Carrier Approval & Exception','/inquiry/menuInit.do?menuChoice=carrierApprovalException','','100','30');
oM.makeMenu('','p3000','Defaults','/inquiry/menuInit.do?menuChoice=groupDefaults','','50','30');
oM.makeMenu('p4000','','Transaction','','','80');
oM.makeMenu('','p4000','Drug Log','/inquiry/menuInit.do?menuChoice=log','','100');
oM.makeMenu('','p4000','End Of Day','/inquiry/menuInit.do?menuChoice=endOfDay','','80');
oM.makeMenu('','p4000','Code','/inquiry/menuInit.do?menuChoice=code','','50');
oM.makeMenu('','p4000','Dental Transactions','/inquiry/menuInit.do?menuChoice=dentalTransaction','','130');
oM.makeMenu('p7000','','Reports','','','50');
oM.makeMenu('','p7000','Member History Report','/inquiry/menuInit.do?menuChoice=cardHistoryReport','','160');
oM.makeMenu('','p7000','Provider Deposit Report','/inquiry/menuInit.do?menuChoice=providerDepositReport','','140');
oM.makeMenu('p8000','','Provider','','','150');
oM.makeMenu('','p8000','Pharmacy','/inquiry/menuInit.do?menuChoice=pharmacy','','80');
oM.makeMenu('','p8000','Dental','/inquiry/menuInit.do?menuChoice=dentalOffice','','50');
</script>



<script language="JavaScript">
oM.construct()
function loopNodes(){}
</script>


<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td bgcolor="#0D0E20"><img src="/inquiry/images/spacer.gif" width="1" height="19">
</td>
</tr>
</table>
</div>
<!-- end primary table -->



</td>
</tr>
<tr>
<td valign="top">

<div id="mainMenu2">
<table width="100%" border="0" cellspacing="0" cellpadding="2" align="center">
<tr>
<td class="pageTitle">Member Information</td>
</tr>
<tr>
<td valign="top">
<div class="screen">
<p>Click on a Claim ID to display the details of that record. Click on an underlined column header to sort the results by that column.</p>
</div>
</td>
</tr>
<tr>
<td align="center">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="bold" valign="top" nowrap width="15%">Insurer No.:</td>
<td valign="top" width="20%">10
</td>
<!--<td class="bold" valign="top" nowrap width="10%">Division:</td>
<td valign="top" width="20%">000001
</td>
<td class="bold" valign="top" nowrap width="10%">Unit/Class:</td>
<td valign="top" width="20%">0000
</td>-->
<td class="error" valign="top" nowrap width="20%">
<a href="javascript:eek:penPopup('/inquiry/memberCoverage.do?memberobjid=11507224958280
',250,600)">View Coverage Level</a>
</td>
<td width="15%"> </td>
<td nowrap width="15%">&nbsp;</td>
<td width="15%">&nbsp;</td>
</tr>
<tr>
<td class="bold" valign="top" nowrap>Group No.:</td>
<td valign="top">000001
</td>
<td class="bold" valign="top" nowrap>Effective Date:</td>
<td valign="top">09-Aug-2006
</td>
<td class="bold" valign="top" nowrap>Termination Date:</td>
<td valign="top">29-May-2007
</td>
</tr>
<tr>
<td class="bold" valign="top" nowrap>Member ID:</td>
<td valign="top">000000000000001
</td>
<td class="bold" valign="top" nowrap>Relationship Code:</td>
<td valign="top">01
</td>
<td class="bold" valign="top" nowrap>Issue No.:</td>
<td valign="top">02
</td>
</tr>
<tr>
<td colspan="2">&nbsp;</td>
<td class="bold" valign="top" nowrap>Coverage Priority:&nbsp;</td>
<td valign="top">S
</td>
<td class="bold" valign="top" nowrap>DUR Option:</td>
<td valign="top">N
</td>
<tr>
<td class="bold" valign="top" nowrap>First Name:</td>
<td valign="top">MICHAEL
</td>
<td class="bold" valign="top" nowrap>Date of Birth:</td>
<td valign="top">15-Jan-1965
</td>
<td class="bold" valign="top" nowrap>Language:</td>
<td valign="top">E
</td>
</tr>
<tr>
<td class="bold" valign="top" nowrap>Last Name:</td>
<td valign="top">WILSON
</td>
<td class="bold" valign="top" nowrap>Multiple Birth:</td>
<td valign="top">N
</td>
<td class="bold" valign="top" nowrap>Provincial Threshold Accum.:</td>
<td valign="top">N
</td>
</tr>
<tr><td colspan="6">&nbsp;</td></tr>
<tr>
<td class="bold" valign="top" nowrap>Street:</td>
<td valign="top">423-1150 GOODFELLOW RD
</td>
<td class="bold" valign="top" nowrap>Street2:</td>
<td valign="top">
</td>
<td class="bold" valign="top" nowrap>City:</td>
<td valign="top">HOUSTON
</td>
</tr>
<tr>
<td class="bold" valign="top" nowrap>Province:</td>
<td valign="top">PE
</td>
<td class="bold" valign="top" nowrap>Postal Code:</td>
<td valign="top">F4F5F5
</td>
<td class="bold" valign="top" nowrap>Address Type:</td>
<td valign="top">Home
</td>
</tr>
</table>
</td>
</tr>
<tr><td>&nbsp;</td></tr>
<tr><td>&nbsp;</td></tr>
<tr>
<td>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td NOWRAP align="right" valign="top">
<form name="layoutChangeForm" method="post" action="/inquiry/claimHistoryViewLayoutChange.do?claimHistoryView=true" style="display:inline" target="_top">
<!-- dynamic display different color of cardholder notes button based on whether notes exists -->

<input type="button" name="cardholderNotesButton" tabindex="1" value="Member Notes" onclick="openSamePopup('/inquiry/jsp/card/cardholderNotes.jsp','cardNoteWin','300','600')" class="notesButton">

<input type="submit" name="changeLayoutButton" tabindex="2" value="Change Layout" class="actionButton">
</form>
<form name="claimHistoryViewForm" method="post" action="/inquiry/claimHistoryRefineSearchInit.do" style="display:inline" target="_top">&nbsp;&nbsp;|&nbsp;&nbsp;
Go to:
<select name="goToPage" onchange="document.forms[1].submit()">
<option value="select" >Select Page</option>
<option value="claimHistoryRefineSearch" >Refine Search</option>
<option value="cardExceptionSearch" >Card Exceptions</option>
<option value="cardLimitSearch" >Card Limits</option>
<option value="cardHistoryReportSearch" >Member History Report</option>
<option value="cardholderSearch" >Members</option>
<option value="unpaidERClaim" >Unpaid Defer</option>
</select>


</form>
<form name="claimHistoryViewForm" method="post" action="/inquiry/claimHistoryView.do" style="display:inline" target="_top">
<button class="buttonsize" type="submit" id="payeeB" tabindex="5" onclick="document.forms[2].action=document.forms[2].action + '?payee=true'"><label for="payeeB" accesskey="a">P<span class="underline">a</span>yee Details</label></button>
</form>
<form name="claimHistoryViewForm" method="post" action="/inquiry/claimHistoryView.do" style="display:inline" target="_top">
<button class="buttonsize" type="submit" id="backB" tabindex="5" onclick="document.forms[3].action=document.forms[3].action + '?claimHistoryViewBack=true'"><label for="backB" accesskey="b"><span class="underline">B</span>ack</label></button>
</form>
<form name="claimHistoryViewForm" method="post" action="/inquiry/claimHistoryView.do" onsubmit="disablebutton(this);" style="display:inline" target="_top">

<br>


&nbsp;<button class="buttonsize" type="button" id="downloadPdfB" tabindex="4" onclick="javascript:eek:penPopup('claimHistoryViewPdf.do',400,500)"><label for="downloadPdfB" accesskey="p">View <span class="underline">P</span>DF</label></button>
<!-- <input type="button" name="viewpdf" value="<label for="downloadPdfB" accesskey="p">View <span class="underline">P</span>DF</label>" onclick="javascript:eek:penPopup('claimHistoryViewPdf.do',400,500)" class="buttonsize"> -->

</form>

<form name="downloadForm" method="post" action="/inquiry/allDownload.do" style="display:inline" target="_top"></form>
<button class="buttonsize" type="button" id="downloadB" tabindex="4" onclick="openModal('/inquiry/jsp/download/downloadFrame.jsp',400,500,'claimHistoryView.do?downloadButton=true')"><label for="downloadB" accesskey="d"><span class="underline">D</span>ownload</label></button>

</td>
</tr>
</table>
</td>
</tr>
<tr>
<td class="pageTitle">Claim History</td>
</tr>
</table>
</div>



<iframe src=" name="dataFrame" id="dataFrame" style="height:942.0px; width:100%" scrolling="NO" frameborder="0"></iframe>



</td>
</tr>
<tr>
<td height="40">
<div ID="Footer2" align="center" class="footer">

albertest Inquiry System&nbsp;Multiple Benefit 003.000.020.&nbsp;Copyright &copy; 2004 albertest Inc.
<br><br></div>
</td>
</tr>
</table>
</body>
</html>
 
Hi:

Sorry, I forgot how to put the html tags in a:
I thought it was <QUOTE></QUOTE> but this doesn't seemed to work.

Yours,

Frustrated
 
Hi

Code:
<script language="JavaScript1.2" src="/inquiry/jsp/common/[red]coolmenus4.js[/red]">
That coolmenus4.js is the one available at ? Because that also implements its own [tt]window.onresize[/tt], so would kick yours.

For code use [tt][ignore]
Code:
[/ignore][/tt] ... [tt][ignore]
[/ignore][/tt], as specified in the TGML.

Feherke.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top