| View previous topic :: View next topic |
| Author |
Message |
Koplaf
Joined: 28 May 2006 Posts: 130
|
Anyone know why document.getElementById("foo").value = bar1+bar2+bar3; doesn't work for me?
Bar1= document.getElementById['bar1']; etc.
Shouldn't that work? or am I missing something? |
| |
|
|
|
|
Klimapol
Joined: 27 May 2006 Posts: 134
|
| getElementById is a method, not a collection. |
| |
|
|
Koplaf
Joined: 28 May 2006 Posts: 130
|
| Well, if i want to concat input fields and make them the value of another, what would be the best way to do that? |
| |
|
|
Klimapol
Joined: 27 May 2006 Posts: 134
|
| Err. By calling getElementById as a method? |
| |
|
|
Koplaf
Joined: 28 May 2006 Posts: 130
|
Should it be document.form.blah.value ?
Maybe i'm just not seeing when the best time is to use getElementById
Oh... hmmm ok |
| |
|
|
PaulKolin
Joined: 25 May 2006 Posts: 108
|
| Koplaf, it's getElementById() not [] |
| |
|
|
Koplaf
Joined: 28 May 2006 Posts: 130
|
| Oh damnit |
| |
|
|
PaulKolin
Joined: 25 May 2006 Posts: 108
|
| Yes, but he was being a retard and missed it ;) |
| |
|
|
Koplaf
Joined: 28 May 2006 Posts: 130
|
Klimapol, ya, but now i get it :)
Thanks |
| |
|
|
PaulKolin
Joined: 25 May 2006 Posts: 108
|
| Koplaf, hehe, np :) |
| |
|
|
| Page 1 of 2 |
Goto page 1, 2 Next |
|