Solved

jquery UI

Posted on 2012-12-23
3
291 Views
Last Modified: 2012-12-28
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
0
Comment
  • 2
3 Comments
 
LVL 11

Expert Comment

by:mcnute
ID: 38717387
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.
0
 
LVL 15

Accepted Solution

by:
Gurpreet Singh Randhawa earned 0 total points
ID: 38718011
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
0
 
LVL 15

Author Closing Comment

by:Gurpreet Singh Randhawa
ID: 38726464
Solved Own by Using jquery UI tabs ID attribute and calling the Page using the Load Functionality
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
jQuery detect if it is a mobile device 3 90
Adding a Li to a UL after a specified Li contents 2 42
jQuery Syntax 2 46
Add css and js to MVC Project not in project 9 27
What is a Lightbox? A Lightbox is the effect you see when you click, for example, an image and the screen fades out and up pops the same image but in its full size dimensions. There are lots of Lightbox effects for jQuery. Problem is they are a…
Introduction Chart.js, used properly, can visually add a difference to your charting applications. It engages your visitors and allows them to interact with data they otherwise wouldn't be able to without expensive and complicated systems. For this…
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

947 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now