Hello Guys,

I'm in the middle of creating this sort of solution using the
scriptaculous framework and mysql to save the panel positions.

The only problem i am facing here (which i was after some suggestions)
is that i can setup the interface only if the list (using
sortables.create) for the panels is hardcoded into the main page with
an sql loop loading the panels.

the problem with this setup is - you cannot add a panel to the group
via ajax and save it's position without reloading the page - as the
query is on the main panels page.

eg
--------------------------------------
SELECT * FROM panels ORDER BY panelpos ASC

<ul id="col1">
<?php do { ?>
 <li id="col1_<?php panelID; ?>">
  <div id="pContent_<?php panelID; ?>">{load panel contents in here
via ajax call|}</div>
   </li>
    </li>
<?php } while ($row_rsCol1 = mysql_fetch_assoc($rsCol1)); ?>
 </ul>

 <script type="text/javascript">

  Sortable.create("col1", {
        onUpdate: function() {
                new Ajax.Request("update-panel-positions.php", {
            method: "post",
            parameters: { data: Sortable.serialize("col1")}

 </script>

--------------------------------------

If i try to put the above list inside an ajax request, then my
sortables.create code doesn't work becuase it is trying to execute
ajax inside ajax.

Does this make sense?
--- - - - - - - - - - -- -- - - -----
Thank you in advance.
Nic
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Spinoffs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to