Focal Point
[Solved] Maintain HTML Table set value of cell when another cell is modifiec

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/7177099396

July 24, 2020, 09:52 AM
Deana
[Solved] Maintain HTML Table set value of cell when another cell is modifiec
Good morning,

I am using 7.7.03. I have an HTML table on a maintain winform. The form has a check box in column 2. If the user makes changes to columns 5, 6, 7 or 8, I need to set the check box to checked using javascript. I have searched everything I can think of. Does anyone have any suggestion.
Thank you, Deana

This message has been edited. Last edited by: Deana,


WebFOCUS 7.6.8 and 7.7.03; Windows Server 2003 R2 and Windows Server 2008 R2, respectively; Development environments - Windows Server 2003 R2 and Windows 7 Professional, respectively;
excel, html, pdf
July 24, 2020, 11:15 AM
MartinY
Normally below should work

MyCtrlField0.checked = true;

MyCtrlField should be your control name


WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
July 24, 2020, 07:36 PM
Deana
Martin, You are correct.

I have set the checkbox value for checkboxes on the form in the past, but not within an table. I initially copied the logic from my other code, but it did not work. Apparently I had a syntax error I could not see this morning. Using the following code works allows me to pass the name of the checkbox control to my js function so it works for each row.

function setChecked(strControlName) {
var objCheck = document.getElementById(strControlName);
objCheck.checked=true;
}

strColumnName = ColumnName|rowindex;

Thank you for you help. I appreciate it.

Deana


WebFOCUS 7.6.8 and 7.7.03; Windows Server 2003 R2 and Windows Server 2008 R2, respectively; Development environments - Windows Server 2003 R2 and Windows 7 Professional, respectively;
excel, html, pdf