Hi
I'm using the scriptaculous drag and drop library and having a
nightmare with scrolling and getting the draggable to scroll too!
I've deliberately not used tables.
I have a container DIV (timeholder) with other DIVS inside
(therapist). Each internal DIV has an id corresponding to a time.
When I scroll the page up ... and drag someother over the DIV, it's
not saving the correct time (e.g. 1400), it's still giving me the time
of the DIV that should be there before the scrolling! If that makes
sense.
Does anyone know how to get the droppable part of the drag and drop to
scroll when I scroll the page and still register in the right place??
I've been reading something about absolute and relative positioning,
but have little idea what they mean?!
The CSS is:
Main holder:
#timeholder {
width: 80px;
font-family: Arial, Helvetica, sans-serif;
font-size: 10px;
font-weight: normal;
color: #FFF;
vertical-align: top;
float: left;
position: relative;
margin-left: 15px;
margin-top: 10px;
}
Internal DIV structure/setup ...
#therapist {
width: 95%;
height: 25px;
font-family: Arial, Helvetica, sans-serif;
font-size: 10px;
text-align: center;
position: relative;
margin:0 auto;
vertical-align: middle;
border-top: 1px dashed white;
float: left;
}
.droppable {
height: 25px;
width: 95%;
position: relative;
}
The HTML seems to be set up correctly, but there is something not
quite right with the scrolling and the droppable
HTML:
<div class="droppable" id="2009-06-05/15:00:00/3">
<script type="text/javascript">
//<![CDATA[
Droppables.add("2009-06-05/15:00:00/3", {onDrop:function(element){new
Ajax.Request('/appointment/add_appointment/2009-06-05%2F15:00:00%2F3',
{asynchronous:true, evalScripts:true, parameters:'id=' +
encodeURIComponent(element.id) + '&authenticity_token=' +
encodeURIComponent('bc5e1a5c5cf0a736c37a80a843131e64d316527e')})}})
//]]>
</script>
</div>
Thanks once again for any help you can give.
Darren
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" 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-talk?hl=en
-~----------~----~----~----~------~----~------~--~---