I am using Scriptaculous and jQuery in the same website (because I don't like jQuery's drag/drop code) and am having some issues. With the following code, my draggables and droppables will work, but my upload button will NOT work. Below is the code for the upload button and for the images, any ideas whats going on?
UPLOAD BUTTON CODE <script type= "text/javascript">/*<![CDATA[*/ $(document).ready(function(){ var button = $('#btnupload'), interval; new AjaxUpload(button,{ action: 'upload.php', name: 'userfile', onSubmit : function(file, ext){ // change button text, when user selects file button.text('Uploading'); // If you want to allow uploading only 1 file at time, // you can disable upload button this.disable(); // Uploding -> Uploading. -> Uploading... interval = window.setInterval(function(){ var text = button.text(); if (text.length < 13){ button.text(text + '.'); } else { button.text('Uploading'); } }, 200); }, onComplete: function(file, response){ button.text('Upload'); window.clearInterval(interval); // enable upload button this.enable(); // if image is valid, add file to the list if (response == 'NAFILETYPE') { alert('You can only upload JPG / JPEG image formats.'); } else { document.getElementById('filelist').innerHTML = '<img src="<?php echo $rooturl ?>uploads/images/'+mykey+'-'+mylid+'/thumbs/'+response +'" style="padding: 5px" onclick="delitem(\'image\',\''+response +'\')" />'+document.getElementById('filelist').innerHTML; } } }); });/*]]>*/</script> DRAG/DROP BUTTON CODE <script type="text/javascript"> var J = jQuery.noConflict(); new Draggable('1247521267',{ revert:true }); new Draggable('1247519597',{ revert:true }); new Draggable('1247519592',{ revert:true }); new Draggable('1247519588',{ revert:true }); new Draggable('1247519581',{ revert:true }); new Draggable('1247519577',{ revert:true }); new Draggable('1247519568',{ revert:true }); new Draggable('1247519554',{ revert:true }); new Draggable('1247519498',{ revert:true }); Droppables.add('trashbin', { accept: 'draggable', onDrop: function(element) { delimage(mylid,element.id); } }); Droppables.add('curthumb', { accept: 'draggable', onDrop: function(element) { alert('New Preview Thumbnail: '+element.id); } }); </script> --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Prototype & script.aculo.us" group. To post to this group, send email to prototype-scriptaculous@googlegroups.com To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en -~----------~----~----~----~------~----~------~--~---