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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T05:05:27+00:00 2026-05-18T05:05:27+00:00

http://pastebin.ca/1996549 The pastebin link may help if my wording doesn’t. I basically have a

  • 0

http://pastebin.ca/1996549

The pastebin link may help if my wording doesn’t. I basically have a site that contains a bunch of custom sortables. Although the user can remove them no problem – they can never add them.

Any time a sortable needs to be added to the site I have to write up a set of identical parameters and the only thing that changes is the ID number (you can see the example in my pastebin).

How could I set this up as a loop instead of some 2000 line javascript file that contains X amount of identical blocks.

  • 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-18T05:05:28+00:00Added an answer on May 18, 2026 at 5:05 am

    You could supply an array of the IDs necessary from the database with PHP and get an AJAX routine to bring this back as a JSON array, then iterate over that.

    <?php
    // boxIDList.php
    
    // Connect to the DB
    include("config.php");
    
    $resultboxone = mysql_query('SELECT id FROM `activejobs` WHERE active = 1');
    
    $boxIDList = array();       
    while($row = mysql_fetch_assoc($resultboxone))  {
      $boxIDList[] = $row['id'];
    }
    
    echo json_encode($boxIDList);
    
    exit();
    ?>
    

    The jQuery could then be as follows: (I’m not sure how you use your routines)

    $.getJSON('boxIDList.php', function(boxIDs) {
       $.each(boxIDs, function(i, value) {
         boxspank(value);
         boxspanklist(value);
       });
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

http://pastebin.com/m24c4f508 --any help would be appreciated
Pastebin link: http://pastebin.com/f40ae1bcf The problem: I made a wx.Gauge, with the range of 50.
Posted the model at http://pastebin.com/f609771cc getting error: (yes it's windows) File C:\Python25\lib\site-packages\MySQLdb\connections.py, line 35,
I have this list http://pastebin.me/dde64f8c185de9dd5e429f84701a01ce Anytime you click on an image extra content appears
i have the following string: http://pastebin.com/d29ae565b i need to separate each value and put
I have the following sample HTML code: http://pastebin.com/Mya6tPc6 And here is the jQuery code
I have the following inequalities on 21 variables: http://pastebin.com/raw.php?i=FTU970Em When I run Reduce[ineq,Integers] on
Here's a pastebin link to my entire jQuery code. [ http://pastebin.com/w57ma5Gx ] The Thumbnails
http://en.wikipedia.org/wiki/ICalendar I'm working to implement an export feature for events. The link above lists
http://developer.yahoo.com/javascript/howto-proxy.html Are there disadvantages to this technique? The advantage is obvious, that you can

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.