According to SitePoint (and my own experiments), the IE implementation of \"setAttribute()\" is buggy and unreliable.
Also according to SitePoint, the name
name
Why not use setAttribute("name", yourValue) it works perfectly fine.
setAttribute("name", yourValue)