CheckBox selected not staying checked on weblock when activating tab
Application Type
Traditional Web
Platform Version

I have a screen with some weblocks. One of these weblocks, it contains checkboxes (see image below). When the user select one of these checkboxes, there´s a javascript that is called on "onclick" event of the checkbox to activate the tab. The problem is that the checkbox is not statying checked when the tab is activated. Does anyone knows how can I fix this?

The Javascript code which is called when the checkbox is selected:

function ChangeTab(tabId) {

var clickTab = document.querySelector('#" + Tab.Id + "_li_' + abaId + ' > a');

clickTab .click();


Hello Guilherme,

Just by analysing your topic, I assume you probably have an Ajax Refresh being performed on that list containing checkboxes and making the checkboxes assume it's default value.
Can you provide any more detail about the complete behavior of that components?

Best Regards,


Hello Vitor,

Thanks for replying.

The only ajax refresh that is performed on the container which holds the list is when the it´s clicked on the chevron-up or down to expand the table. 

Are you handling the OnChange event of the checkboxes in any way?

Do you have any element on your page that could be submitting your page?

I can´t believe I figure out how to fix.

Before calling the javascript function ChangeTab() I call the function:

osAjaxBackend.BindBeforeSubmit(function(){             document.getElementById('"+checkboxSelected.Id+"').checked = true; 


Doing that it worked for me. The thing is, I don't know exactly what was causing it, but doing this, helped.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.