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 Pages / How to get a handle on...
Power Pages
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

Categories:
I have the same question (0)
  • H V Profile Picture
    1,510 on at

    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.

  • z_mike70 Profile Picture
    15 on at

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

  • Verified answer
    ragavanrajan Profile Picture
    7,044 Most Valuable Professional on at

    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

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

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 Pages

#1
Fubar Profile Picture

Fubar 74 Super User 2025 Season 2

#2
Jerry-IN Profile Picture

Jerry-IN 55

#3
sannavajjala87 Profile Picture

sannavajjala87 31

Last 30 days Overall leaderboard