Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7583215
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T18:37:35+00:00 2026-05-30T18:37:35+00:00

I have a table (jqGrid) inside one of the jquery ui tabs (the first

  • 0

I have a table (jqGrid) inside one of the jquery ui tabs (the first one). This table has service requests which are identified as links in that table. When the links are pressed, they should open the detailed service request info into a new tab following the first one.

The problem I am having is, when you open one of the service requests in a new tab and close it, resetting the number of tabs into one which hosts the table; Trying to open the service request again will cause the service request info to be opened into a new tab which is equal to the number of previous tabs which were closed previously.

To be precise, if we have #ui-tab-1, clicking the service request link inside it, will open the service request info into a #ui-tab-2. Now, closing #ui-tab-2 tab and clicking the another service request link will cause #ui-tab-2 to be activated along with the new tab #ui-tab-3. #ui-tab-2 hosts the newly opened ticket info.

I am using scrollableTabs v2.0 plugin/layer to handle the scrollable tabs.

This is the code I am having

var $third_l_tabs = $('#table-nav').tabs({
    show: function(event, ui) {
        //we only care about the first tab which hosts the grid.
        if (ui.index == 0) {
            tableToGrid('#' + table_id, {
                defaults: {
                    recordtext: "View {0} - {1} of {2}",
                    emptyrecords: "No records to view",
                    loadtext: "Loading...",
                    pgtext: "Page {0} of {1}"
                },
                loadonce: true,
                height: 'auto'
            });
            jQuery('#' + table_id).trigger('reloadGrid');
        }

        $(ui.panel).on('click', "td[role='gridcell'] a", function(event) {
            //here where the addition of new tab fails.
            $third_l_tabs.tabs('add', this.href, $(this).find('b').text());  
            event.preventDefault();
        });
    },
})

And I was checking jQuery ui call stack and I noticed that the show() function of the tabs is called for each one of these unrequited closed old tabs!

This is the trace I got in Chrome and as you can see the last 3 lines, show is called again repetitively

$.tabs.show() at scp.js:580
$.Widget._trigger() at jquery-ui-1.8.17.custom.js:581
$.widget._tabify.showTab() at jquery-ui-1.8.17.custom.js:7195
$.widget._tabify() at jquery-ui-1.8.17.custom.js:7282    <-- it starts from here
jQuery.extend.dequeue() at jquery-1.7.1.js:2066
jQuery.fn.extend.dequeue() at jquery-1.7.1.js:2098
jQuery.extend.each() at jquery-1.7.1.js:658
jQuery.fn.jQuery.each() at jquery-1.7.1.js:271
jQuery.fn.extend.dequeue() at jquery-1.7.1.js:2097
$.widget._tabify.hideTab() at jquery-ui-1.8.17.custom.js:7211
$.widget._tabify() at jquery-ui-1.8.17.custom.js:7278
jQuery.extend.dequeue() at jquery-1.7.1.js:2066
jQuery.fn.extend.dequeue() at jquery-1.7.1.js:2098
jQuery.extend.each() at jquery-1.7.1.js:658
jQuery.fn.jQuery.each() at jquery-1.7.1.js:271
jQuery.fn.extend.dequeue() at jquery-1.7.1.js:2097
$.widget.load() at jquery-ui-1.8.17.custom.js:7544
$.widget._tabify() at jquery-ui-1.8.17.custom.js:7285
jQuery.event.dispatch() at jquery-1.7.1.js:3256
jQuery.event.add.elemData.handle.eventHandle() at jquery-1.7.1.js:2875
jQuery.event.trigger() at jquery-1.7.1.js:3144
jQuery.fn.extend.trigger() at jquery-1.7.1.js:3781
jQuery.extend.each() at jquery-1.7.1.js:658
jQuery.fn.jQuery.each() at jquery-1.7.1.js:271
jQuery.fn.extend.trigger() at jquery-1.7.1.js:3780
$.xui.tabs.$.extend._create.hiddenOn.right() at jquery.scrollabletab.js:101
jQuery.event.dispatch() at jquery-1.7.1.js:3256
jQuery.event.add.elemData.handle.eventHandle() at jquery-1.7.1.js:2875
jQuery.event.trigger() at jquery-1.7.1.js:3144
jQuery.fn.extend.trigger() at jquery-1.7.1.js:3781
jQuery.extend.each() at jquery-1.7.1.js:658
jQuery.fn.jQuery.each() at jquery-1.7.1.js:271
jQuery.fn.extend.trigger() at jquery-1.7.1.js:3780
$.Widget._trigger() at jquery-ui-1.8.17.custom.js:578
$.widget.add() at jquery-ui-1.8.17.custom.js:7411
(anonymous function)() at jquery-ui-1.8.17.custom.js:421
jQuery.extend.each() at jquery-1.7.1.js:658
jQuery.fn.jQuery.each() at jquery-1.7.1.js:271
$.widget.bridge.$.fn.(anonymous function)() at jquery-ui-1.8.17.custom.js:418
$.tabs.show() at scp.js:581
jQuery.event.dispatch() at jquery-1.7.1.js:3256
jQuery.event.add.elemData.handle.eventHandle() at jquery-1.7.1.js:2875

Any help about what could be the issue would be appreciated. I included the JSFiddle example for this issue.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T18:37:36+00:00Added an answer on May 30, 2026 at 6:37 pm

    Adding event.stop() after event.preventDefault() did the trick. Please see http://jsfiddle.net/neo108/pY3pJ/1/

    For some reason the event is being triggered more than once. Add a event.stop() to stop the event from being triggered the second time and so forth…

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have table inside a div tab. The table has 40 rows in it
i have table unser it i have one td with elemets inside the menu
I've implemented a JQGrid table with loadonce:true like this : jQuery(#list).jqGrid({ datatype: 'jsonstring', datastr
Ive got a jquery app that has several grids (jqgrid) in defferent tabs. Below
I have a jqgrid where the database table has a few thousand rows, but
I have this code just to send data from already loaded jqGrid: jQuery(#bedata).click(function(){ //Function
I have this mysql tables I want to display with jqgrid. The problem appears
I have table with some fields that the value will be 1 0. This
I have a JQGrid plugin in my website, the table is loading OK, but
I have 1000 records in a table which holds position field starting from 1

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.