Why the same radio button onclick event behaves differently in Edge when running from different JBoss servers?

JiaHe 0 Reputation points
2024-06-07T01:49:10.9933333+00:00

A UI component<h:selectOneRadio> with onclick event (javascript to bind data) works fine in an application deployed from one JBoss server in Edge, however it doesn't work in the same application deployed from another JBoss server in the same Edge browser.

Code snippet

<rich:column>
	<h:selectOneRadio 
		id="code_radio"
		layout="lineDirection"
		onclick="uncheck(this);updateSelected()">
			<f:selectItem itemValue="#{item.getValue()}" />
	</h:selectOneRadio>
	<a4j:jsFunction name="updateSelected"
		action="#{updateAction.updateSelected()}"
		data="" 
		ajaxSingle="true"> 										
	</a4j:jsFunction> 									
</rich:column>

<script type="text/javascript">
	function uncheck(radio) {
		var name = radio.name.substring(radio.name.lastIndexOf(':'));
	    var elements = radio.form.elements;
	    for (let i = 0; i &lt; elements.length ; i++) {
	        if (elements[i].name.substring(elements[i].name.lastIndexOf(':')) == name) {
	            elements[i].checked = false;
	        }
	    }
			if (document.getElementById('create_form:selected_value'))	{												document.getElementById('create_form:selected_value').value = radio.value.split('-')[0].trim();
	document.getElementById('create_form:code_details').value = radio.value;
	radio.checked = true;  	
}	  			    			 	
	}
</script>
Microsoft Edge
Microsoft Edge
A Microsoft cross-platform web browser that provides privacy, learning, and accessibility tools.
2,356 questions
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.