Adding Two Buttons to Table View

Got something cool to share with AppGini users? Feel free to post it here!
Post Reply
mohamed
Veteran Member
Posts: 80
Joined: 2020-04-19 16:18

Adding Two Buttons to Table View

Post by mohamed » 2022-07-24 07:51

Hello,

I have created this BadIP-TV.js file in Hooks to run the two scripts, for the new created buttons in the Table View.

The problem both buttons run the same file http://WebSite/alerts/BadIP.php

Would you please assist with the Functions and IDs .. THANK YOU :roll:


BadIP-TV.js
jQuery(function(){
jQuery('#Filter').after('<button class="btn btn-default" type="button" id="filter-button"> Generate IP Groups</button>');
jQuery('button[id=filter-button]').click(function(){
window.location = 'http://WebSite/alerts/BadIPGroup.php';
});
});


jQuery(function(){
jQuery('#Filter').after('<button class="btn btn-default" type="button" id="filter-button"> Generate IPs</button>');
jQuery('button[id=filter-button]').click(function(){
window.location = 'http://WebSite/alerts/BadIP.php';
});
});
Attachments
Adding Buttons in TV..PNG
Adding Buttons in TV..PNG (112.29 KiB) Viewed 871 times
THANK YOU...
AppGini Pro 24.11 -
Calendar - Search Page Maker - Summary Reports - Mass Update - DataTalk -
bizzworxx AppGini Helper JabaScript Library - bizzworxx Inline Detail-View - bizzworxx Helper Pack - AppGini Helper Packaging Tool -
Udemy course

pbottcher
AppGini Super Hero
AppGini Super Hero
Posts: 1635
Joined: 2018-04-01 10:12

Re: Adding Two Buttons to Table View

Post by pbottcher » 2022-07-24 15:13

Hi,

please put you code in the code display. That makes it easier.

Try

Code: Select all

jQuery(function(){
  jQuery('#Filter').after('<button class="btn btn-default" type="button" id="filter-button-ipgroup"> Generate IP Groups</button>');
  jQuery('button[id=filter-button-ipgroup]').click(function(){
    window.location = 'http://WebSite/alerts/BadIPGroup.php';
  });
});


jQuery(function(){
  jQuery('#Filter').after('<button class="btn btn-default" type="button" id="filter-button-ip"> Generate IPs</button>');
  jQuery('button[id=filter-button-ip]').click(function(){
    window.location = 'http://WebSite/alerts/BadIP.php';
  });
});
Any help offered comes with the best of intentions. Use it at your own risk. In any case, please make a backup of your existing environment before applying any changes.

mohamed
Veteran Member
Posts: 80
Joined: 2020-04-19 16:18

Re: Adding Two Buttons to Table View

Post by mohamed » 2022-07-25 05:33

Hi pböttcher,

Great, THANKS FOR YOUR HELP 8-)
so, the idential IDs was the cause, and I must use unique IDs

Sure, next time will use inlinecode to post the code.


I am wondering, What is the best Reference or Documentation of AppGini Functions and Variables ?


Thanks again ..
THANK YOU...
AppGini Pro 24.11 -
Calendar - Search Page Maker - Summary Reports - Mass Update - DataTalk -
bizzworxx AppGini Helper JabaScript Library - bizzworxx Inline Detail-View - bizzworxx Helper Pack - AppGini Helper Packaging Tool -
Udemy course

Post Reply