| View previous topic :: View next topic |
| Author |
Message |
Kopilman Enthusiastic Coder
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
Reply with quote
|
| |
|
|
autos06 Enthusiastic Coder
Joined: 13 May 2006 Posts: 123 Location: New York
| |
Kopilman Enthusiastic Coder
Joined: 25 May 2006 Posts: 162
|
Apparently that doesn't work on innerHTML
$('cart').innerHTML.toLowerCase
Reply with quote
|
| |
|
|
Roombor Enthusiastic Coder
Joined: 02 Jun 2006 Posts: 111
|
Doesn't toLowerCase return the lower case version? Not alter the string in place?
Reply with quote
|
| |
|
|
autos06 Enthusiastic Coder
Joined: 13 May 2006 Posts: 123 Location: New York
|
Yeah, it doesn't operate on the string, it returns a string value
Reply with quote
|
| |
|
|
Kopilman Enthusiastic Coder
Joined: 25 May 2006 Posts: 162
|
Either way it's not a method of innerHTML
Oh
So toLowerCase($('cart').innerHTML) ?
Reply with quote
|
| |
|
|
autos06 Enthusiastic Coder
Joined: 13 May 2006 Posts: 123 Location: New York
| |
Roombor Enthusiastic Coder
Joined: 02 Jun 2006 Posts: 111
|
Kopilman, $('cart').innerHTML = $('cart').innerHTML.toLowerCase()
Reply with quote
|
| |
|
|
Kopilman Enthusiastic Coder
Joined: 25 May 2006 Posts: 162
|
I'm telling you it's erroring. It's telling me toLowerCase is not a metheod of innerHTML
Reply with quote
|
| |
|
|
Roombor Enthusiastic Coder
Joined: 02 Jun 2006 Posts: 111
| |
| Page 1 of 3 |
Goto page 1, 2, 3 Next |
|