I have two <span> -tags with the same ID in different places om my page. I know it’s wrong to use the same ID twice. It’s no problem for me to change the ID’s to classes.
HTML:
<span id="tumme">4</span>
...
<span id="tumme">4</span>
....
is updated by
AJAX:
document.getElementById(tumme).innerHTML = xmlHttp.responseText;
but only on the <span> is updated.
Any ideas?
Well, you could use the NAME attribute. It is perfectly valid to have multiple nodes with the same NAME.
So you would have these nodes:
To update them, you would do something like: