Set HTML <param> element via jQuery?
<p>JS/JQuery Newb here!</p>

<p>I have a value stored in variable, and I need to plug it into a particular <code>&lt;parameter&gt;</code> element associated with an <code>&lt;object&gt;</code>. Here's an example of what I was hoping I could do:</p>

<pre><code>&lt;script&gt;

    function SetParam(incomingValue){
         $('#baz').value = incomingValue ;
    }

    $(document).ready (function() {

       // jquery POST happens here, which takes a second or two to complete
       // SUCCESS condition calls SetParam() with a value  

        });
&lt;/script&gt;

&lt;object class="foo"&gt;
    &lt;param name="bar" value="xyzzy" /&gt;
   &lt;param name="baz" value="" id="baz" /&gt;
&lt;/object&gt;
</code></pre>

<p>No joy. The baz parameter controls how the object is visually rendered, and I see no changes to indicate I've successfully changed the value.</p>

<p>I'm not sure if: </p>

<p><strong>A.</strong> My syntax is wrong in terms of addressing the "baz" parameter in SetParam()</p>

<p><strong>B.</strong> My syntax is fine, but the object has already rendered by the time I hit SetParam(), so setting the value of baz does nothing useful</p>

<p><strong>C.</strong> All of the above</p>

<p>Can anyone kick me in the right direction?</p>

<p>(and if my problem includes scenario "B" - is there a way to delay the loading of that <code>&lt;object&gt;</code> until I've actually set the value of the <code>&lt;parameter&gt;</code> that I need to?)</p>

<p>Here's a "JSFiddle" of same - Just found about about this and jsbin. Woot!</p>

<p><a href="http://jsfiddle.net/sPhrw/" rel="nofollow">http://jsfiddle.net/sPhrw/</a> </p>
