Using events...
See original GitHub issueThe events section on the bootstrap-table website is gone so I just tried, but no luck so far. I want to capture the onclickrow event. I have a table like this:
<table id="id_main_dbgrid_1" name="main_dbgrid_1" data-toggle="table" data-url="./main.php?component=main_dbgrid_1" data-cache="true" data-height="100%" data-search="true" data-show-columns="true" data-show-refresh="true" data-pagination="true" data-side-pagination="server" data-page-list="[5, 10, 20, 50, 100, 250]" data-page-size="1" style="background-color:rgb(204,204,204);">
<thead>
<tr style="background-color:rgb(104,104,104);">
<th data-field="naw_nr" data-searchable="true">nr</th>
<th data-field="naw_naam" data-searchable="true">naam</th>
<th data-field="naw_adres" data-searchable="true">adres</th>
<th data-field="naw_woonplaats" data-searchable="true">woonplaats</th>
</tr>
</thead>
</table>
I applied the following javascript:
$("#id_main_dbgrid_1").onClickRow(function(row, $data) {
var str='';
procbutton(str+'&cmd=first');
});
This doesn’t get triggered. Other events in the same html like buttons onclick do work, so I must be doing something wrong. Besides that, the grid is working properly.
Can anybody point me what I’m doing wrong here?
Issue Analytics
- State:
- Created 8 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
Introduction to events - Learn web development | MDN
Events are actions or occurrences that happen in the system you are programming, which the system tells you about so your code can...
Read more >JavaScript Events - W3Schools
HTML events are "things" that happen to HTML elements. When JavaScript is used in HTML pages, JavaScript can "react" on these events.
Read more >Handling Events in JavaScript
Learn how to perform event handling in JavaScript including HTML Event Handler attributes, DOM Level 0 Event Handlers, and DOM Level 2 Event...
Read more >Events in C# - TutorialsTeacher
An event is a notification sent by an object to signal the occurrence of an action. Events in .NET follow the observer design...
Read more >JavaScript - Events - Tutorialspoint
What is an Event ? ... JavaScript's interaction with HTML is handled through events that occur when the user or the browser manipulates...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@aducom, you use the event in a wrong way, the correct way is:
or:
Tnx for your correction and update docs. It’s a great component.