Solved

jquery UI

Posted on 2012-12-23
3
289 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
Question by:myselfrandhawa
  • 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:
myselfrandhawa 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:myselfrandhawa
ID: 38726464
Solved Own by Using jquery UI tabs ID attribute and calling the Page using the Load Functionality
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

In this article you'll learn how to use Ajax calls within your CodeIgniter application. To explain this, I'll illustrate how to implement a simple contact form to allow visitors to send you an email through your web site.
Introduction Knockoutjs (Knockout) is a JavaScript framework (Model View ViewModel or MVVM framework).   The main ideology behind Knockout is to control from JavaScript how a page looks whilst creating an engaging user experience in the least …
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)
The viewer will learn the basics of jQuery including how to code hide show and toggles. 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…

708 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

13 Experts available now in Live!

Get 1:1 Help Now