views:

23

answers:

1

How to check/uncheck a checkbox with javascript in lotus notes?

I´ve tried a lot of different javascript codes but none worked....

the input type checkbox is insidea form called form1..

thanks

A: 

View the source for the Web page produced by Domino and determine what the name of your checkbox is. You're looking for an HTML tag called with a type="checkbox". Get 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 example, if the checkbox is named "mycheckbox", the code would be:

document.form1.mycheckbox.checked = true;

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

document.form1.mycheckbox.checked = !document.form1.mycheckbox.checked;  
Ken Pespisa