$('checkbox') does indeed work returning me the element.  I had to do this...

var check = $('checkbox'); check.disabled = false;

I'll take another look at it though, but I've run into this more than once.

Thanks for the correction.

On 7/13/06, Ryan Gahl <[EMAIL PROTECTED]> wrote:
Yep, you're definitely doing something wrong somewhere, or using a wrong
version of something... sounds like in your example $('checkbox') is not
finding the element, meaning you are either not using the correct id for the
element in question, or perhaps you are trying to do this before the element
is actually loaded into the page. Attach element referencing code to the
body's onload event... or if you're into spaghetti scripting, put the script
tag at the bottom of the page or after the innerHTML or DOM insertion voodoo
in the case this is all in an AJAX context...

...point being... something is amuck, man...


On 7/13/06, Andrew Kaspick <[EMAIL PROTECTED]> wrote:
> I haven't been able to set properties using $().  I was referencing a
> checkbox with this yesterday such as $('checkbox').disabled = false
> and this threw a js error saying disabled was undefined or something
> similar.  Perhaps I'm using an older version or doing something very
> slightly wrong, cause I've never had this work for me.
>
> On 7/13/06, Keith Davis < [EMAIL PROTECTED]> wrote:
> > That's not true. I set properties using $() all the time. In fact,
> > $().value works but $F() does not to set a value.
> >
> >
> > Keith Davis (214) 906-5183
> >
> > -----Original Message-----
> > From: [EMAIL PROTECTED]
> > [mailto: [EMAIL PROTECTED]
On Behalf Of
> > Andrew Kaspick
> > Sent: Thursday, July 13, 2006 2:59 PM
> > To: rails-spinoffs@lists.rubyonrails.org
> > Subject: Re: [Rails-spinoffs] $F
> >
> > Should only return a value I believe.  $('some_element') works in a
> > similar fashion.  It doesn't return the dom element directly in order
> > for you to set properties on it, only read them.
> >
> > On 7/13/06, Keith Davis <[EMAIL PROTECTED]> wrote:
> > >
> > >
> > >
> > > Am I crazy or does $F only return the value of an element? In other
> > > words, it can't be used to set that same value?
> > >
> > > _____________________
> > > Thanks,
> > >
> > > Keith Davis - MCSA, A+, N+
> > > P.R.I.D.E. - Director of Computer Services www.pridedallas.com Work
> > > (214) 351-6600 ext. 119 Mobile (214) 906-5183
> > >
> > > _______________________________________________
> > > Rails-spinoffs mailing list
> > > Rails-spinoffs@lists.rubyonrails.org
> > >
http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
> > >
> > >
> > >
> > _______________________________________________
> > Rails-spinoffs mailing list
> > Rails-spinoffs@lists.rubyonrails.org
> >
http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
> > _______________________________________________
> > Rails-spinoffs mailing list
> > Rails-spinoffs@lists.rubyonrails.org
> >
http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
> >
> _______________________________________________
> Rails-spinoffs mailing list
> Rails-spinoffs@lists.rubyonrails.org
>
http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
>


_______________________________________________
Rails-spinoffs mailing list
Rails-spinoffs@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs



_______________________________________________
Rails-spinoffs mailing list
Rails-spinoffs@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs

Reply via email to