How can I put check/uncheck a checkbox using lotus notes with JavaScript?

Asked By 0 points N/A Posted on -
qa-featured

 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?  

SHARE
Answered By 0 points N/A #119109

How can I put check/uncheck a checkbox using lotus notes with JavaScript?

qa-featured

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;  

 

Related Questions