Try:
var total = parseFloat($('foo').innerHTML);
On Thu, Nov 6, 2008 at 03:06, Scott <[EMAIL PROTECTED]> wrote:
>
> If I have an element:
>
> <span id='foo'>50</span>
>
> Should I be able to say the following?
>
> var total = parseFloat($('foo'));
>
> Instead, I am getting a return value of:
>
> [object HTMLSpanElement]
>
> and parseFloat is returning NaN.
>
> Thanks in advance.
>
> >
>
--
Grazie al modello matematico posso dirvi Come è nato l'universo:
non chiedetemi il Perché. (Stephen Hawking)
--~--~---------~--~----~------------~-------~--~----~
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 [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~----------~----~----~----~------~----~------~--~---