ez4ne12c
11-17-2002, 01:41 AM
Hi I am trying to use outerHTML to make an image visible
i pass the variable parameter "name"
to the function
...
appear just toggles the visiblity, and it works if the id is a single word but if the id has a space in it i have a problem
appear="<span id='christianname surname'style='position: relative;left: -150px; display: inline; visibility: visible;'>"
appear+="<img src='frame.gif'></img>";
appear+="</span>";
alert(appear);
name.outerHTML=appear;
alert(name+" added")
the part where i get stuck is that there is a space in the span id
i have tried
name.value.outerHTML=appear;
does anyone know how to assign the outerHTML property to a span id with an embedded space
Thanks
ez
i pass the variable parameter "name"
to the function
...
appear just toggles the visiblity, and it works if the id is a single word but if the id has a space in it i have a problem
appear="<span id='christianname surname'style='position: relative;left: -150px; display: inline; visibility: visible;'>"
appear+="<img src='frame.gif'></img>";
appear+="</span>";
alert(appear);
name.outerHTML=appear;
alert(name+" added")
the part where i get stuck is that there is a space in the span id
i have tried
name.value.outerHTML=appear;
does anyone know how to assign the outerHTML property to a span id with an embedded space
Thanks
ez