The recommended method of customizing your AppGini-generated application is through hooks. But sometimes you might need to add functionality not accessible through hooks. You can discuss this here.
-
ayussuf
- Veteran Member
- Posts: 39
- Joined: 2021-01-20 17:15
Post
by ayussuf » 2021-02-26 21:42
Hi,
I want to make a button on Detail View and use it to open other table based on the data in current table. But when I click the button it just refresh the current table.
What is the problem?
My code is like this, on footer-extra.php:
Code: Select all
var url = $j('#Penilaian_Penyelia_link').attr("href");
var pid = <?php echo $PenyeliaID;?>;
var url2 = url + "addNew_x=1&filterer_penyelia=" + pid;
$j('#Penilaian_Penyelia_link').attr("href",url2)
$j('#Pengajaran_dv_action_buttons #deselect').before('<button id="penilaianpenyelia" class="btn btn-success" type="submit" name="insert_x" value="1" onclick="location.href=\'' + url2 + '\'"><i class="glyphicon glyphicon-plus-sign"></i> Penilaian Penyelia</button>');
//The button look like this:
//<button id="penilaianpenyelia" class="btn btn-success" type="submit" name="insert_x" value="1" onclick="location.href = 'Penilaian_Penyelia_view.php?filterer_tarikh_tajuk=1&addNew_x=1&filterer_penyelia=2';"><i class="glyphicon glyphicon-plus-sign"></i> Penilaian Penyelia</button>
AppGini 5.92 - Upgraded to 5.94
-
pbottcher
- AppGini Super Hero
- Posts: 1635
- Joined: 2018-04-01 10:12
Post
by pbottcher » 2021-02-26 21:55
Hi,
try
Code: Select all
$j('#Pengajaran_dv_action_buttons #deselect').before('<button id="penilaianpenyelia" class="btn btn-success" type="submit" name="insert_x" value="1" onclick="event.preventDefault();location.href=\'' + url2 + '\'"><i class="glyphicon glyphicon-plus-sign"></i> Penilaian Penyelia</button>');
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.
-
ayussuf
- Veteran Member
- Posts: 39
- Joined: 2021-01-20 17:15
Post
by ayussuf » 2021-02-26 23:36
Wow... it's works... thank you very much..
AppGini 5.92 - Upgraded to 5.94