I have this block of code for a context menu:
This menu item works perfectly:
-
else if (action == 'folder') {
-
$.post("php/createfolder.php", { folder: el[0].className },
-
function(data) {
-
$(el[0].parentNode.parentNode).load("php/loadsection.php", { idClass: el[0].className }, function(data)
-
{
-
createMenu();
-
makeEditable();
- } ); } ); }
another part of the code never runs the createmenu or makeEditable functions unless I throw an alert!
Can anyone help figure this out?
-
else if (action == 'section') {
-
$.post("php/createsection.php",
-
function(data) {
-
$("#nav").load("php/load.php"),
-
function() {
-
createMenu();
-
makeEditable();
-
} } ); }
The .post and .load both work fine but in the second example, the createmenu and makeeditable never run.
Thanks for any help.
-