sortable list w/php ajax

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Anyone modify the scripts at http://www.phpriot.com/d/articles/client-side/sortable-lists-with-php-and-ajax/index.html? I'm just looking to include more fields in the listing and possibly in tables. An option to move one at a time to the top of the list by clicking a button on each line would be nice. I've got the script to work, just not with multiple fields and the other additions.

The parts that would probably need the changes are:

$books = array();
while ($row = mysql_fetch_object($result)) {
   $books[$row->tablekey] = $row->title;
}
return $books;

---
(builds the array) and
---

<ul id="books_list" class="sortable-list">
   <? foreach ($books as $tablekey => $title) { ?>
      <li id="book_<?= $tablekey ?>"><?= $title ?></li>
   <? } ?>
</ul>

---
lists the fields out

I'd really like to change out the list with a table...

Thanks...

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux