tags:

views:

550

answers:

1

Given a

<div id="dialog" style="display:none; width:100%; vertical-align:middle;">
    <object id="player" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" name="player" width="628" height="400">
     <param name="movie" value="../../help/videos/videoplayer.swf" />
     <param name="allowfullscreen" value="true" />
     <param name="allowscriptaccess" value="always" />
     <param name="flashvars" value="file=../../help/videos/video.flv" />
     <object type="application/x-shockwave-flash" data="../../help/videos/videoplayer.swf" width="628" height="400">
      <param name="movie" value="../../help/videos/videoplayer.swf" />
      <param name="allowfullscreen" value="true" />
      <param name="allowscriptaccess" value="always" />
      <param name="flashvars" value="file=../../help/videos/video.flv" />
     </object>
    </object>

Why won't a

$("#dialog").find('<param name="flashvars" value="file=../../help/videos/video.flv" />').replaceWith('<param name="flashvars" value="file=../../help/videos/myfile.flv" />');

work?

A: 

You are not passing a selector to find, you could do something like this:

$('#player param[name=flashvars]').attr('value','new value');
CMS
Unfortunately this does not work in IE.
Rio