Jump to content

Drag and drop menu


Canman2005

Recommended Posts

I've managed to add in the following to that code

 

<script>
function ajaxLoader(url,id) {
  if (document.getElementById) {
    var x = (window.ActiveXObject) ? new ActiveXObject("Microsoft.XMLHTTP") : new XMLHttpRequest();
  }
  if (x) {
    x.onreadystatechange = function() {
el = document.getElementById(id);
        el.innerHTML = "";

      if (x.readyState == 4 && x.status == 200) {
        el = document.getElementById(id);
        el.innerHTML = x.responseText;
      }
    }
    x.open("GET", url, true);
    x.send(null);
  }
}
</script>
<script>
$(document).ready(function(){

$("ul.sortable").tree({
dropOn: ".item_name",
placeholder: 'placeholder',   
tabSize: 20, 
maxDepth: 2,
maxDepthError: 'ui-tree-deptherror',
maxDepthErrorText: 'Only three levels are alowed!',
maxItems: [7], 
maxItemsError: 'ui-tree-limiterror', 
maxItemsErrorText: 'You have reached the maximum number of items for this level!'
});

$("#serializebtn").click(function(){
 var sorte = $("ul.sortable").tree("serialize");
 ajaxLoader('update.php?action='+sorte+'','content'); 
});

});
</script>
<span id="content"></span>

 

which posts to a database when the

 

<a href="#" id="serializebtn">serialize</a>

 

link is clicked.

 

but it is only inserting

 

list[]=1

 

into the database.

 

how can I get it to post the correct data?

 

thanks

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.