How to add html content next to search input field

How to add html content next to search input field

MatadorMatador Posts: 1Questions: 1Answers: 0

I'd like to add a linked image of add button to take user to another page to add content to the database. How do I do that?

Answers

  • bindridbindrid Posts: 730Questions: 0Answers: 119

    this code adds a link button right after the search box and applies jquery ui button to it

    see it here http://live.datatables.net/ficemafo/1/edit

            $(document).ready(function () {
                var columns = [{ title: "Name" }, { title: "Position" }, { title: "Office" }, { title: "Age" }, { title: "Start_Date" }, { title: "Salary" }];
    
                // I use the preInt event to add the selectbox
                $("#example").one("preInit.dt", function () {
    
                    $button = $("<a>go</a>");
                    $("#example_filter label").append($button);
                    $button.button();
    
                });
                var table = $('#example').DataTable(
                  {
                      serverSide: true,
    
                      ajax: {
                          url: "examples/server_side/scripts/server_processing.php",
                          data: function (filter) {
    
                            return filter;
                          }
    
                      }
                  }
                );
            });
    
    
This discussion has been closed.