on 04-24-2012 6:59 AM
Hi Experts,
I found something weird about using one applet's selection event to resize another applet. I have a ispcchart and a igrid. What I want to do is expand the chart when I select the igrid. Using the selection event, the chart frame did expand but the chart area remains the same size(selection event of ibrowser has the same problem). But when I use a button onclick to call the same function, the chart and the chart area expand proportionally as expected. Is this a bug or a Java behaviour? Is there a workaround that I can make the applet selection + resize working? Attached the sample code below. BTW, I also tried to use selection event to call some javascript to create a applet in a td. It hung the webpage while a button onclick works properly.
My MII version is 12.2.3(179). Thanks in advanced.
Best regards,
Lawrence
<HTML>
<HEAD>
<TITLE>Your Title Here</TITLE>
<SCRIPT language="JavaScript">
function btnClickClick(){ // same code as grdSelected()
document.getElementById("Data").width=600;
document.getElementById("Data").height=300;
document.getElementById("Data").setDisplayTemplate("Lawrence/DisplayTemplates/spcData");
document.getElementById("Data").updateChart(true);
}
function grdSelected(){ // same code as btnClickClick()
document.getElementById("Data").width=600;
document.getElementById("Data").height=300;
document.getElementById("Data").setDisplayTemplate("Lawrence/DisplayTemplates/spcData");
document.getElementById("Data").updateChart(true);
}
</SCRIPT>
</HEAD>
<BODY>
<table height="700" width="800">
<tr height="30%">
<td id="td1" width="50%">abjcklajskdfljaskl;dfj</td>
<td id="td2" width="50%">
<applet width="300" height="150" id="Data" name="Data" codebase="/XMII/Classes" code="iSPCChart" archive="illum8.zip" width="100%" height="100%" mayscript>
<param name="QueryTemplate" value="Lawrence/QueryTemplates/xacData">
<param name="DisplayTemplate" value="Lawrence/DisplayTemplates/spcData">
<param name="InitialUpdate" value="true">
</applet>
</td>
</tr>
<tr height="30%">
<td><input type="button" id="btnClick" value="click" onclick="btnClickClick()"></td><td></td>
</tr>
<tr height="30%">
<td>
<applet name="Data" codebase="/XMII/Classes" code="iGrid" archive="illum8.zip" width="400%" height="200%" mayscript>
<param name="QueryTemplate" value="Lawrence/QueryTemplates/xacData">
<param name="DisplayTemplate" value="Lawrence/DisplayTemplates/grdData">
<param name="InitialUpdate" value="true">
<param name="SelectionEvent" value="grdSelected">
</applet
</td><td></td>
</tr>
</BODY>
</HTML>
Shot in the dark but I would try using the javascript setTimeout() function.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
11 | |
6 | |
2 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.