jquery UI

Gurpreet Singh Randhawa
Gurpreet Singh Randhawa used Ask the Experts™
on
I have a Tab system like below:

$( "#tabs" ).tabs({
             beforeLoad: function( event, ui ) {
             ui.jqXHR.error(function() {
             ui.panel.html(
                   "Couldn't load this tab. We'll try to fix this as soon as possible.");
                   });
             }
       });

Now inside the first Tab, i have a link names view Data. Open Clicking  want that it should open in the Same Tab from were it is clicked and show the data in tabular format. and in that page [Add Data] link will be there, which will just open the add action within the same Tab

how this is possible.

Also while viewing i want to use pagination so it loads data within the same and navigate back and forth

Please guide
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®

Commented:
Add Data link is calling some page which outputs information in a database?

I would do it like the following:

$.ajax({
        url: '/path/to/the/page/which-querys-your-data.php',
        data: 'some data in a key-value manner',
        error: function (XMLHttpRequest, textStatus, errorThrown) {
             console.log(textStatus+' '+errorThrown);
        },
        success: function(data) {
            $('.class_of_element_where_the_data_goes').html(data);
        }
        });

Open in new window


Your php page is making a query of your database and would echo the html already in the table structure.
Thanks for the Info, I solved it by using the ID of the Tab and then Reloading the Contents through the Herf Attribute and Jquery's ON click event

Thanks
Solved Own by Using jquery UI tabs ID attribute and calling the Page using the Load Functionality

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial