-
Checkbox Troubles
Currently, when I click a checkbox in form 2, if i navigate to form 3 using a button then navigate back to form 2 using a button, the checkbox is no longer checked. I tried using a variable to store whether the checkbox is checked or not but I'm having troubles. Please help.
-
In the first frame, i declare a variable, strOrganDonorCheck as "y";
My code in the second frame (where the checkbox is):
PHP Code:
if (chkOD.selected == true){
_root.strOrganDonorCheck = "y";
}
if (_root.strOrganDonorCheck == "y"){
chkOD.selected = true;
}
-
is there a way to toggle boolean values?
-
Flash deselects the checkboxes for some reason, but using this script will work 
PHP Code:
var listenerObject:Object = new Object(); listenerObject.click = function(eventObject:Object) { if(chkOD_status== false){ chkOD_status = true; } else if(chkOD_status == true){ chkOD_status = false; } else { chkOD_status = true; } chkOD.addEventListener("click", listenerObject);
if(chkOD_status == true){ chkOD.selected = true; }
-
I got a statement block must be terminated by '}' on line 3 and syntax error on line 17.
-
Heh. you forgot the last } on the last line
-
I tried it and the checkbox still becomes unselected if moving to a different frame
-
Hmm.. could you send the source?
-
I'm sorry I can't because it's not 'my' project, it's my company's project.
-
Oh, okay... Well, I have no idea why it doesn't work.. Could have something to do with the instance names. You could read up on the script, if you do not understand it, and try to mess a bit with it
-
Basically what I need is a way that if i select the checkbox, to change a value in a variable.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|