Freeman35 Posted July 1, 2018 Share Posted July 1, 2018 Hello, This is command for toastr ( https://github.com/CodeSeven/toastr ) Command: toastr["success"]("<div><button type="button" id="okBtn" class="btn btn-primary">Close me</button><button type="button" id="surpriseBtn" class="btn" style="margin: 0 8px 0 8px">Surprise me</button></div>") This command add two more button on toastr, I wanna add ajaxRequest command on onclick event for each one. I'm try this command but not work. And I'm trying in "TmyToaststr = class(TUniComponent)" for my useage. JSName for this component. onclick:function(){ajaxRequest('+JSName+',''clicked'',[''clickedOn=btn_1'']); } regards Link to comment Share on other sites More sharing options...
Sherzod Posted July 1, 2018 Share Posted July 1, 2018 Hello, Can you make a simple testcase for this... ?! Link to comment Share on other sites More sharing options...
Hayri ASLAN Posted July 8, 2018 Share Posted July 8, 2018 Hi You can add this to your js code $('#okBtn').click(function(){ ajaxRequest(JSNAME, "okBtn"); }); $('#surpriseBtn').click(function(){ ajaxRequest(JSNAME, "surpriseBtn"); }); Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now