On the Stage I have a textfield with a checkbox in html, a button and an output textfield. Upon clicking the button I wish to pass the value of the checkbox (on/off) to the output textfield.
So for the Stage I'm using this code for compositionReady:
function (sym, e)
// insert code to be run when the composition is fully loaded here
sym.$('inputFrame').html("<input type='checkbox' name='vehicle1' value='Bike'> I have a bike");This puts the checkbox html code in the main textfield.
On the button I'm using this code:
function (sym, e)
// insert code for mouse click here
myValue = $('#vehicle1').val();
sym.$('outputFrame').text(sym.$('inputFrame').html(myValue));
I was thinking this would take the value of the checkbox, store it in myValue and output it in the output textframe, but is does nothing. What am I doing wrong?