Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

trying to clear a single checkbox

Status
Not open for further replies.

Bastien

Programmer
May 29, 2000
1,683
CA
I have a series of independant checkboxes on my PDF and I need to be able clear one after its been checked and now needs to be unchecked if the user clicks on it again.

I am playing with the JS code for this, but am not having much success.
Code:
var f = this.getField("additional_info.work_schedule_mon.s");
if(f.isBoxChecked(0))
  f.checkThisBox(0,false);
else
  app.alert("The Box is not Checked");
Any ideas?

Bastien

I wish my computer would do what I want it to do,
instead of what I tell it to do...
 
Not sure I fully understand - do you want to prevent the user from checking the box again after it has been cleared by you/your script?

"If toast always lands butter-side down, and cats always land on their feet, what happens if you strap toast on the back of a cat and drop it?"
- Steven Wright
 
No, I need to be able to turn it on and off depending on the state when it gets clicked again.

Bastien

I wish my computer would do what I want it to do,
instead of what I tell it to do...
 
Sorry, I'm still unclear what you mean - perhaps if you post a full explanation of exactly what you are trying to do?

"If toast always lands butter-side down, and cats always land on their feet, what happens if you strap toast on the back of a cat and drop it?"
- Steven Wright
 
got it sorted, thanks...only took a day of attempts at coding with the damn event bubbling up all the time....

Bastien

I wish my computer would do what I want it to do,
instead of what I tell it to do...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top