S
Stefan Mueller
How can I set the Name of a button?
I tried
xelement = document.createElement("input")
xelement.type = "button"
xelement.name = "MyButton"
but it does not work with the Internet Explorer (Mozilla is fine). I don't
get an error message but if I try to address this button by its name
e.g. document.getElementsByName("MyButton")[0].style.visibility = "hidden"
I get with the Internet Explorer (Mozilla works fine) the following error
message:
Error: 'document.getElementsByName(...).0.style' is null or not an object
Code: 0
I tried
xelement = document.createElement("input")
xelement.type = "button"
xelement.name = "MyButton"
but it does not work with the Internet Explorer (Mozilla is fine). I don't
get an error message but if I try to address this button by its name
e.g. document.getElementsByName("MyButton")[0].style.visibility = "hidden"
I get with the Internet Explorer (Mozilla works fine) the following error
message:
Error: 'document.getElementsByName(...).0.style' is null or not an object
Code: 0