As you probably know, objects tags go like:
[code=html]<object…>
<param name=”X” value=”Y”>
<param name=”X” value=”Y”>
<param name=”X” value=”Y”>
…
<embed…>
</embed>
</object>
I’ve given an ID to my of my params:
[code=html]<param id=”dynamicparam” name=”X” value=”Y”>
And now all I want to do is:
[code=html]<a href=”#” onclick=’document.getElementById(“dynamicparam”).value=”Whatever”; return false’>Replace the default dynamicparam’s value</a>
I’ve confirmed it actually works by doing:
[code=html]<a href=”#” onclick=’alert(document.getElementById(“dynamicparam”).outerHTML); return false’>Show the current dynamicparam</a>
But the object tag just doesn’t get updated!
The only way I’ve managed to find in order to update the object tag was by replacing the whole tag:
[code=html]<object id=”myobject”…>
…
<a href=”#” onclick=’document.getElementById(“myobject”).outerHTML=”<object … entire paragraphs of code … </object>”; return false’>Replace the whole object tag…</a>
But it looks very – very – inefficient to me. Why can’t I just replace the value of one poor param?