web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Javascript to uncheck ...
Power Automate
Unanswered

Javascript to uncheck checkbox

(0) ShareShare
ReportReport
Posted on by 4

I have a bunch or URLs , which I am opening one after other. After the page opes, I want to run Javascript to unselect a few checkboxes. I have the code written and tested in console of that web page and it works. However, when I try to run the same script in PAD, it does not work. No error - No checkbox update.

I have the same question (0)
  • UshaJyothiKasibhotla Profile Picture
    203 Moderator on at

    please try this

     

    <html>
     <body>
     <input id="check1" type="checkbox" checked="" name="copyNewAddrToBilling">
     </body>
     <script language="javascript"> document.getElementById("check1").checked = true;
     document.getElementById("check1").checked = false;
     </script>
    </html>


     

  • PriyankaHaridas Profile Picture
    4 on at

    @UshaJyothi20 I did try that, it works well in the page's console. But does not work when i add it to javascript in Power automate

  • UshaJyothiKasibhotla Profile Picture
    203 Moderator on at

    document.querySelector("input[type='checkbox']").checked=false

     

    document.querySelector("input[type='checkbox']").checked=true

     

    here input=tag

    type = attribute name

    the checkbox is the attribute value

    you have to customize it as per your scenario by inspecting the page.

    please let me know if it works

     

    Regards

    Usha.

     

     

     

     

  • UshaJyothiKasibhotla Profile Picture
    203 Moderator on at

    you can check by javascript console

    UshaJyothi20_0-1698748951223.png

     

  • Agnius Bartninkas Profile Picture
    Most Valuable Professional on at

    Can you share the script you used?

  • PriyankaHaridas Profile Picture
    4 on at

    I used a workaround by creating custom selectors. These is working for me now. Thanks all!

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 522 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard