Hi,

Can't see any reason that wouldn't work, provided the Ruby variable
has the same value both where the div is declared and where you're
outputting your JavaScript (and provided that ID is unique within the
document).  You haven't accidentally allowed it to get incremented in
the meantime or something?

FWIW,
--
T.J. Crowder
tj / crowder software / com
Independent Software Engineer, consulting services available


On Feb 22, 11:03 pm, craig <bagley.cr...@gmail.com> wrote:
> I'm generating div's dynamically based on the number of entries in a
> table, and I'd like to make them draggables as well but it's not
> working for me.  I think the problem is with using a ruby variable
> inside the javascript:
>
> drag= "drag"       (changed by the iterator by adding a char after
> each cycle through)
>
> <div id="<%= drag %>
>
> <script type="text/javascript">
>     new Draggable('<%=drag%>'), { scroll: window, revert: true };
> </script>
>
> new Draggable('<%=drag%>')
>
> I'm relatively positive it's with using the var inside the javascript
> declaration, so is there some different syntax I can use here to make
> it work?
>
> Thanks
--~--~---------~--~----~------------~-------~--~----~
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