JavaScript Trouble

Jun 04, 2013

Hey Everyone!

I have run into some trouble.  I have references to both variables (vRoot and vSqrt) in a text box.  The user inputs the vRoot in a numeric entry, my reference for that works just fine.  But when I click the button to execute the script (see below)  the reference for the vSqrt remains zero.  I'm using explorer.  Thanks!

var player = GetPlayer();

var root = player.GetVar("vRoot");

var n = Math.sqrt(root).toString();

player.SetVar("vSqrt",n);

Be the first to reply

This discussion is closed. You can start a new discussion or contact Articulate Support.