change iframe source in ie using javascript

Posted by rohini on Stack Overflow See other posts from Stack Overflow or by rohini
Published on 2009-03-31T08:03:27Z Indexed on 2010/06/07 12:52 UTC
Read the original article Hit count: 232

Filed under:
|

Hi, i have used an iframe which looks like this

<iframe style='width: 330px; height: 278px' scrolling='no' name="iframeId" class="advPlayer" id="iframeId" frameborder="0" src='../../player/iabpreview.php?adid=<?php echo $selectedAdIdx ?>&amp;autoPlay=true'></iframe>

whenever i click a div,i have to change the source of the iframe..so i am using

if ($j.browser.msie) {            

   frames['iframeId'].window.location="../player/iabpreview.php?adid="+adId+"&autoPlay=true";
    }else
    {
    $j(".advPlayer").eq(0).attr("src", "../player/iabpreview.php?adid="+adId+"&autoPlay=true");    
    }

this is working in firefox...but not in ie.....

someone please help me...

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about iframe