| View previous topic :: View next topic |
| Author |
Message |
Kopilman
Joined: 25 May 2006 Posts: 162
|
Is this syntactically correct?
* dnm (i=dnm@113.sub-70-220-238.myvzw.com) has left #rails
If ($('cart').innerHTML.match(/No items/)) {
What's the tolower function in JS?
If ($('cart').innerHTML.toLower.match(/no items/)) {
That doesn't work, nor does tolower
It's toLowerCase
Er, no it's not
Sigh |
| |
|
|
|
|
autos06
Joined: 13 May 2006 Posts: 123 Location: New York
|
Kopilman: yes it is toLowerCase
() |
| |
|
|
Kopilman
Joined: 25 May 2006 Posts: 162
|
Apparently that doesn't work on innerHTML
$('cart').innerHTML.toLowerCase |
| |
|
|
Roombor
Joined: 02 Jun 2006 Posts: 111
|
| Doesn't toLowerCase return the lower case version? Not alter the string in place? |
| |
|
|
autos06
Joined: 13 May 2006 Posts: 123 Location: New York
|
| Yeah, it doesn't operate on the string, it returns a string value |
| |
|
|
Kopilman
Joined: 25 May 2006 Posts: 162
|
Either way it's not a method of innerHTML
Oh
So toLowerCase($('cart').innerHTML) ? |
| |
|
|
autos06
Joined: 13 May 2006 Posts: 123 Location: New York
|
| No |
| |
|
|
Roombor
Joined: 02 Jun 2006 Posts: 111
|
| Kopilman, $('cart').innerHTML = $('cart').innerHTML.toLowerCase() |
| |
|
|
Kopilman
Joined: 25 May 2006 Posts: 162
|
| I'm telling you it's erroring. It's telling me toLowerCase is not a metheod of innerHTML |
| |
|
|
Roombor
Joined: 02 Jun 2006 Posts: 111
|
| Oh. |
| |
|
|
| Page 1 of 3 |
Goto page 1, 2, 3 Next |
|