No of visitors who read this post: 2905
Category: JavaScript
Type: Question
Author: Jacob Troy
No votes yet

 How can I put check/uncheck a checkbox using lotus notes with JavaScript? The input type checkbox is within a form called form1. I even tried a lot of different JavaScript code but it does not work. Can somebody help me on this matter?  

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

# Comment Id: 41291

Look at the source for the Web page produced by Domino. Then you must decide what the name of your checkbox is.

You're looking for an HTML tag called with a type="checkbox". Have the id of that checkbox and use that id to replace the "" part of the code below.

document.form1.<YOUR CHECKBOX ID HERE>.checked = true;

For instance, if the checkbox is named "mycheckbox_test", the code would be:

document.form1.mycheckbox_test.checked = true;

If you need to interchange the checkbox between checked and unchecked, you can use this code, which just sets the checkbox to the opposite state.

document.form1.mycheckbox_test.checked = !document.form1.mycheckbox_test.checked;