Skip to content
Advertisement

i have been using table filter jquery from w3scool. But how do i add message when no data found [closed]

JavaScript

This is the jquery m using.. i dont have much of a knowledge in jquery. Can some one help me on how to show a message of no data found. when there is no result for the search.

This my table.

JavaScript

This is my data table…where data is fetched through database and searched through the above mentioned jquery. search is working fine.. but how do i show the no data found message when there is no result

Advertisement

Answer

Try this:

JavaScript

To avoid annoying alerts go to html, after the end of the table, add div:

JavaScript

Then change the javascript code to be as the following:

JavaScript
User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement