I'm having problems with some JS I'm working with. I'm trying to make a dynamic coverage calculator. Here is the URL of the JS engine I'm using: http://www.lutanho.net/diagram/diagram.js
Here is the code for the input frame:
<SCRIPT Language="JavaScript">
function Draw()
{
parent.rd=document.inputform.rd.value;
parent.frames[1].location.href="db_display.html";
parent.thrw=document.inputform.product.value;
}
</SCRIPT>
Now here is the code for the display frame:
<DIV STYLE="position:absolute; top:0"></DIV>
<SCRIPT Language="JavaScript">
var i, x, y, xmin=parent.xmin, xmax=parent.xmax, ymin=parent.ymin, ymax=parent.ymax, rd=parent.rd; thrw=parent.thrw;
document.open();
var D=new Diagram();
D.SetFrame(60, 45, 460, 445);
D.SetBorder(-200, 200, -200, 200);
D.SetText("Ft.","Ft.", "y=f(x)");
D.Draw("#DDDDDD", "#000000", true, "y="+rd);
document.close();
Draw();
function Draw()
{
P=new Array();
document.open();
P[0]=new Pie(D.ScreenX(0),D.ScreenY(0),0,thrw,0,rd,"#ff6060");
}
</SCRIPT>
Note: the variable "thrw" is coming from a dropdown selector, with numbers as their value options. In theory, putting the variable in should product the same result...instead, it moves the pie slice over to the right a ways. Does anyone know why? any help would be greatly appreciated.
Thanks,
James