Note that there are some explanatory texts on larger screens.

plurals
  1. POIE not retreving Flash Object src from Ajax response
    primarykey
    data
    text
    <p>I am trying to read the src attribute of the flash file which i get in the response of a url and create a new file through swfobject. But it returns me "undefined" when i read the src of the embed tag. My code below.</p> <p>The page i am doing a post on, only has the flash file in it.</p> <h2>The reponse is as below:</h2> <h2>AJAX REsponse</h2> <pre><code>&lt;object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="930" height="630" title="Campaign"&gt; &lt;param name="movie" value="final5.swf" /&gt; &lt;param name="quality" value="high" /&gt; &lt;embed src="final5.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="930" height="630"&gt;&lt;/embed&gt; &lt;/object&gt; </code></pre> <hr> <h2>Script</h2> <pre><code>$.ajax({ url: flashUrl, type: "POST", dataType:"html", success: function(data, status, xhr) { var swfUrl = flashUrl.substr(0, flashUrl.lastIndexOf('/')) + "/" + $(data).find('embed').attr('src'); $('.content').html('&lt;div id="mySwf"&gt;&lt;/div&gt;'); swfobject.embedSWF(swfUrl, "mySwf", "200", "200", '9.0.0', "/resources/expressInstall.swf", flashvars, attributes, params); } }); </code></pre> <hr> <h2>*<em>*</em>*Update (found the issue area but not the solution)</h2> <p>I kinda got to know what the issue is, but i don't know y its occurring. when i run the page with the flash file in IE. it renderes it in a wierd way</p> <pre><code>&lt;object width="930" height="630" title="Campaign" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codeBase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" altHtml=" &lt;embed src="skf-final5.swf" type="application/x-shockwave-flash" width="930" height="630" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" &gt; &lt;/embed&gt; "&gt; </code></pre> <p>it add some <em>altHTML</em> attribute to the Object and the entire embed tag goes into it which screws up the entire stuff. :(</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload