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 8005105
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T17:07:44+00:00 2026-06-04T17:07:44+00:00

In my page I use Ajax tabs using prototypejs. And one of them includes

  • 0

In my page I use Ajax tabs using prototypejs. And one of them includes a sortable. Although sortable works individually,
when I put it into the tab, it doesnt work. How can I solve this problem? Thanks.

my tabs are as follows:

<div id="container">
<div class="tabs" id="tab1">Tab 1</div>
<div class="tabs" id="tab2">Tab 2</div>
<div class="tabs" id="tab3">Tab 3</div>
</div>

my sortable list as follows:

<ul id="list">
    <li>now</li>
    <li>works</li>
    <li>this</li>
</ul>

<script type="text/javascript">
    Sortable.create("list");
</script>

my ajax function is as follows

function init () {

    var tabs = document.getElementsByClassName('tabs');
   for (var i = 0; i < tabs.length; i++) {
    $(tabs[i].id).onclick = function () {
        getTabData(this.id);
    }
}
}
function getTabData(id) {
var url = 'demos/ajax-tabs/process.php';
var rand = Math.random(9999);
var pars = 'id=' + id + '&rand=' + rand;

var myAjax = new Ajax.Request( 
        url, {
              method: 'get', 
              parameters: pars, 
              onLoading: showLoad, 
              onComplete: showResponse
              });

}
function showLoad () {
$('load').style.display = 'block';
    Sortable.create("list");

}
function showResponse (originalRequest) {
//Sortable.create("list");
var newData = originalRequest.responseText;
$('load').style.display = 'none';
$('content').innerHTML = newData;


}
init();
  • 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-06-04T17:07:46+00:00Added an answer on June 4, 2026 at 5:07 pm

    if you call Sortable.create(“list”); function, it will search your page for all element with id “list” make em sortable.

    BUT: With Ajax you need to call Sortable.create() again AFTER content have been loaded successfully because you need to apply sortable again to new content.

    function showResponse (originalRequest) {
        var newData = originalRequest.responseText;
        $('load').style.display = 'none';
        $('content').innerHTML = newData;   // make sure that newData contains <ul id="list">.....</ul>
        Sortable.create("list");
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to use jqueryui tabs widget in ajax requested page. In my site
In my page I use ajax loader gif. When the button is clicked the
I have a webforms page that makes quite extensive use of AJAX. There are
I use a plug-in called nyroModal to call a page via AJAX and display
When i use jquery's $.post ajax function, page freezes for 2-3 seconds and then
In one web page we use a flash upload control but becouse a flash
i'm using jquery tabs.. i'm use tabs-1 as input form and tabs-2 as show
I am using the jQuery Tabs library in a small application. The page has
How can you perform page navigation with Jquery tabs without the ajax events firing?
I use jquery for ajax tabs, not jquery UI that is to large for

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.