0
I created a call in a checkbox for a JS function and the desktop is working perfectly, already in the smartphone browser just doesn’t work. I have other functions that are called the same way in format text inputs on the same screen and have no problems. Already this call in the smartphone checkbox gave dick. Someone has been through a similar problems?
This is the div where I call the function:
<div ><!--class="checkbox">-->
<label><input type="checkbox" id="itemCheck" name="itemCheck" class="flat" onchange="verificafleg()"> Unable to calibrate</label>
</div>
and that’s the function in the JS file:
function verificafleg(){
controle = window.document.getElementById("comment").value;
if (controle == ""){
document.getElementById('comment').value = "Unable to calibrate.";
document.getElementById('comment').setAttribute("readonly", "readonly");
} else if (controle = "Unable to calibrate.") {
document.getElementById('comment').value = "";
document.getElementById('comment').removeAttribute("readonly", "readonly");
}
}
If someone has a light I’m accepting....
You don’t need to put "solved" in the title. I know it’s common in many forums, but here it works different. You have already marked a reply as accepted (when you clicked ) and this is enough to indicate that it has been solved.
– hkotsubo