Re: Help please-draggable

Dark Ambient
Fri, 23 Jun 2006 21:08:43 -0000

Very new to "coding" javascript.

I''ve moved the script below the on top of that, under
the
, outside of the div , very odd. The only error I get from FF
java console is "Draggable is not defined"  IE also reports there are
script errors in the page.

This is script - I think it''s right, I''d like to move on to
options.
new
Draggable(''ele123'', {revert:true})

Stuart


On 6/23/06, Gregory Hill <Gregory_Hill-l9nu40+TWxQ@public.gmane.org>
wrote:
> You need to put the script that creates the draggable below the element
> you want to be draggable.  Pages are parsed sequentially by browsers, so
> your javascript is being evaluated in the HEAD, long before the element
> you are trying to reference has been built by the browser.  I''m
> surprised you aren''t seeing javascript errors galore.  The
alternative
> is to create the draggable in an onload event, but that is not evaluated
> until all images are loaded (this was a topic of discussion last week,
> and there is a complex workaround, so look at the archives for more info
> if you want).
>
> New to Javascript?
>
> Greg
>
> > -----Original Message-----
> > From:
rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
> [mailto:rails-spinoffs-
> > bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf
Of Dark Ambient
> > Sent: Friday, June 23, 2006 2:12 PM
> > To: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
> > Subject: [Rails-spinoffs] Help please-draggable
> >
> > I asked the other day about this problem but haven''t received
a
> response.
> >
> > Trying again:
> >
> > I just downloaded 1.6 and can''t get a simple draggable to
work, which
> > is weird. I know it''s not my browser since the demos are
working.
> > Here is my simple code.  I''ve also had the  "new
Draggable" between
> > the select tags.  Didn''t change anything.
> >
> >
> > <meta http-equiv="Content-Type" content="text/html;
> charset=iso-8859-1" />
> > <script src="/javascripts/prototype.js"
> type="text/javascript">
> > <script src="/javascripts/scriptaculous.js"
> > type="text/javascript">
> > <script src="/javascripts/dragdrop.js"
> type="text/javascript">
> > new
Draggable(''ele123'')
> > .....................
> >
> >
> >
> >
> >
> > <select name="select1" size="5"
id="ele123">
> > Blue
> > Red
> > Orange
> > Green
> > Aquamarine
> >
> >
> >
> >
> >
> > Stuart
> > _______________________________________________
> > Rails-spinoffs mailing list
> > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
> > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs