Sortable Serialize wihout external file

Sortable Serialize wihout external file


I'm using ui.sortable to update rows in a mysql database (as in
http://www.wil-linssen.com/extending-the-jquery-sortable-with-ajax-mysql/
):
    <script type="text/javascript">
    $(document).ready(function() {
        $("#adminimages").sortable({
            placeholder: "sort-placeholder",
            distance: -50,
            scrollSensitivity: 100,
            revert: true,
            handle : ".handle",
            update : function () {
                var order = $("#adminimages").sortable("serialize");
                $("#info").load("process-sortable.php?"+order);
            }
        });
    });
    </script>
I'm a big fan of having no "unnecessary" pages, and I'm wondering if
it would be possible to include the code in the "process-sortable"
file:
    <?php
    include 'admin-connect.php';
    foreach ($_GET['listItem'] as $position => $item) :
        mysql_query("UPDATE `look` SET `position` = $position WHERE `id` =
$item") or die(mysql_error());
    endforeach;
    ?>
in the same page as the rest of the code (i.e. instead of "load"ing
process-sortable.php, i could "load" the script from another part of
the page -- can I just put it into a div and "load" that?