Skip to main content
Community site session details

Community site session details

Session Id :
Power Pages - Power Apps Portals
Answered

How to get a handle on a portal generated button

(0) ShareShare
ReportReport
Posted on by 15

How do you get a handle on a button that is created from the Advanced Form Metadata in Portal Management?  I want to create a jQuery onClick event and I'm not able to fire the event using the button id I capture when I inspect the button from Chrome Developer Tools.

 

portal.png

 

Here is the button and  jQuery:

portal1.pngportal2.png

  • z_mike70 Profile Picture
    15 on at
    Re: How to get a handle on a portal generated button

    Thanks.  Instead of getting a handle on the button using ID, I used class.  That seems to work.

  • Verified answer
    ragavanrajan Profile Picture
    7,036 Most Valuable Professional on at
    Re: How to get a handle on a portal generated button

    HI @z_mike70 

    You need to call the Onclick event slightly different.  I am adding an example below.  Inspect your button either you get the id of the button or use the CSS class name. 

     

    ragavanrajan_0-1633923025555.png

     

     

     

    Try the following code.  Using the id of the button as an example 

     

     

    $(document).ready(function() {
     $('#NextButton').on("click", function() {
     console.log(555, "Ragavan");
     alert("Modal Test")
     });
    
    
    });

     

     

     Output: 

     

    ragavanrajan_2-1633923225411.png

     

     


    Hope it helps. 
    ------------

    If you like this post, give it a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users to find it.

  • z_mike70 Profile Picture
    15 on at
    Re: How to get a handle on a portal generated button

    I want to launch a modal window where you can upload attachments.

  • H V Profile Picture
    1,510 on at
    Re: How to get a handle on a portal generated button

    Hi @z_mike70 

     

    May I know, what you want to achieve using button onClick event??

     

    Like validate some field value or change the text or something else.

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

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Pages

#1
Lucas001 Profile Picture

Lucas001 60 Super User 2025 Season 1

#2
Fubar Profile Picture

Fubar 55 Super User 2025 Season 1

#3
surya narayanan Profile Picture

surya narayanan 35