I'm having some trouble getting a Draggable to dorp onto a Droppable.
I get the old "element is null" error from prototype (its trying to
show an non-existent element).

However, the element being dragged most definitely exists, as does the
droppable. JS generated form Rails helpers.

Any help much appreciated.

 Funny thing is I have just got another page on our app working really
well with draggables and droppables. I did notice an element is null
error on that page but it seems not to affect its functionality.

Code excerpt is below, hope its not too long to skim through.



                                  <div id="release-search-results-panel">
                                                <div id="card-search-results">

        <div style="position: relative;" id="card_Issue_297" class="entity-
search-card level1">

                <span style="display: none;" id="Issue_297_arrow">
                  <img id="Issue_297_expanded" onclick="javascript: return
toggleWallSearchTree(297, 'Issue',false); return false;" src="/images/
icons/arrow_down.gif" style="display: none; cursor: pointer;">
                  <img id="Issue_297_collapsed" onclick="javascript: return
toggleWallSearchTree( 297,'Issue',false);return false;" src="/images/
icons/arrow_up.gif" style="display: inline; cursor: pointer;">
                                                <img id="loading_Issue_297" 
src="/images/indicator.gif"
style="display: none;">
                </span>
                <span id="Issue297_loading" style="display: none;"
class="clearfix">

                  <img src="/images/small-loading.gif">
                </span>
                                I1 : test KPI

        </div>
        <script type="text/javascript">
//<![CDATA[
new Draggable("card_Issue_297", {revert:true})
//]]>
</script>

        <!-- IMPORTANT: span MUST be empty for JS/Ajax to work -->
        <span id="Issue_297_children" class="child-container"></span>

        <div style="position: relative;" id="card_Issue_298" class="entity-
search-card level1">

                <span style="display: none;" id="Issue_298_arrow">

                  <img id="Issue_298_expanded" onclick="javascript: return
toggleWallSearchTree(298, 'Issue',false); return false;" src="/images/
icons/arrow_down.gif" style="display: none; cursor: pointer;">
                  <img id="Issue_298_collapsed" onclick="javascript: return
toggleWallSearchTree( 298,'Issue',false);return false;" src="/images/
icons/arrow_up.gif" style="display: inline; cursor: pointer;">
                                                <img id="loading_Issue_298" 
src="/images/indicator.gif"
style="display: none;">
                </span>
                <span id="Issue298_loading" style="display: none;"
class="clearfix">
                  <img src="/images/small-loading.gif">
                </span>
                                I2 : there is an issue here

        </div>
        <script type="text/javascript">
//<![CDATA[
new Draggable("card_Issue_298", {revert:true})
//]]>
</script>

                                <div style="position: relative;" 
id="release-iterations-panel">
                                        <p>releases/iterations..</p>
                                </div>
                                <script type="text/javascript">
//<![CDATA[
Droppables.add("release-iterations-panel", {after_effect:Element.hide,
before_effect:Element.show, onDrop:function(element){Element.show
('indicator'); new Ajax.Request('/releases/add_item',
{asynchronous:true, evalScripts:true, onComplete:function(request)
{Element.hide('indicator')}, parameters:'id=' + encodeURIComponent
(element.id) + '&authenticity_token=' + encodeURIComponent
('acaa102f216e113331509e9d9e7ef3c6418267e7')})}})
//]]>
</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
-~----------~----~----~----~------~----~------~--~---

Reply via email to