I am continuing my project I have now reached a dead end on my panel i created a button to reset to factory defaults to store text and numbers sto using this string document.querySelector(“#Opacit”).value = “50”; to memorize the CHECKBOX and RADIOBUTTON I tried this way but it doesn’t work document.querySelector(“#checkbox”). checked can someone help me Thank you
If I’m completely honest, I can’t really parse what you’re asking - you say you want to reset to factory defaults (what defaults? Of what? E.g. Photoshop, your plugin, or HTML element values?), but then you appear to be asking how to store input values from checkboxes/radio buttons.
document.querySelector(“#Opacit”).value = “50” this changes the value of the HTML element with the ID of “Opacit” to 50. It doesn’t store as a variable or “reset” anything. It’s basically a UI change.
document.querySelector(“#checkbox”).checked this finds the first element in the DOM with the ID of “checkbox” and returns its checked value, except it doesn’t do anything on its own and at very least needs to be assigned to a variable like so
let checkboxValue = document.querySelector("#checkbox").checked
I believe you’re confusing JS, CEP and UXP. Both CEP and UXP depend on basic JS. If one doesn’t know JS (also HTML and CSS), they won’t be able to develop proper good performant plugins. What you’re asking in this topic, has absolutely nothing to do with UXP or CEP - it’s a pure JS
What you are trying to do would’ve been exactly the same in CEP.