<p>I have some code doing this :</p>

<pre><code> var changes = document.getElementsByName(from);
 for (var c=0; c&lt;changes.length; c++) {
   var ch = changes[c];
   var current = new String(ch.innerHTML);
   etc.
 }
</code></pre>

<p>This works fine in FF and Chrome but not in IE7. Presumably because getElementsByName isn't working in IE. What's the best workaround?</p>

There are a couple of problems:
IE is indeed confusing
```
id=""
```
with
```
name=""
```
```
name=""
```
isn't allowed on
```
<span>
```
To fix, I suggest:
Change all the
```
name=""
```
to
```
class=""
```
Change your code like this:
-
```
```
var changes = document.getElementById('text').getElementsByTagName('span');
for (var c=0; c<changes.length; c++) {
 var ch = changes[c];

 if (ch.className != from)
continue;

 var current = new String(ch.innerHTML);
```
```