javascript - Is it possible to dynamically insert a value of an object parameter? -
i've been trying figure out haven't been able find answer relates issue.
i wondering if possible dynamically enter value of object parameter input box?
example:
<form name="myform"> <input type="visibile" name="formvar" value=""> </form> <object id="myobject"> <param name="color" value="{input destination}" />
i'm wondering if possible dynamically add values "input destination"
thanks
once object
created (when page loaded), param
s passed object. aren't able change "input destination" after that.
you delay creation of object
till input
changed followings.
<form name="myform"> <input type="visibile" name="formvar" value="" onchange="createobject(value)"> </form> <script> function createobject(value) { document.getelementbyid('document_container').innerhtml = '<object id="myobject">' + '<param name="color" value="' + value + '"/>' + '</object>'; } </script> <div id="object_container"></div>
the drawback object
created on , on again once input
changed.
another option ensure object
plugin offers apis accept setting new parameters, example myobject.setparam('color', value)
.
Comments
Post a Comment