In my javascript code, I'm creating an <object>
like so:
var myObject = document.createElement('object');
Then, I to add some parameters to this object, so that these are reflected in my html.
I can do it like this, but after adding more and more paremeters, this code gets really messy and repetitive.
var param1 = document.createElement('param');
param.setAttribute('name', 'myName');
param.setAttribute('value', 'myValue');
myObject.appendChild(param1);
Is there a better way to create an and add parameters to this object?
If it makes any difference, this is an activeX control object.
Thanks!