pathrelative-pathflashvarscooliris

Cooliris relative path Issue


Take a look on my codes:

> <object id="o" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
> width="100%" height="100%">   <param name="movie"
> value="cooliris.swf"/>   <param name="allowFullScreen" value="true"/> 
> <param name="allowScriptAccess" value="never"/>   
> <param name="flashvars" value="feed=http://IP/xml/cooliris.xml"/>  
> <param name="wmode" value="opaque"/>   <embed
> type="application/x-shockwave-flash"
>     src="cooliris.swf"
>     width="100%"
>     height="100%"
>     allowfullscreen="true"
>     allowscriptaccess="never"
>      flashvars="feed=http://IP/xml/cooliris.xml"
>     wmode="opaque">   </embed>  </object>

It's actually working fine but when i change the path from absolute to relative, the image file is not showing but other image info is shown except only in the image itself. How can i use relative path instead of absolute path?


Solution

  • You may use something like..

    var _LOCAL_HOST = window.location.hostname;
    
    $("#o").append('<embed id="embed" width="100%" height="100%" wmode="opaque"
    allowscriptaccess="never" allowfullscreen="true" src="cooliris.swf" type="application/x-shockwave-flash"
     flashvars="feed=http://'+_LOCAL_HOST+'/xml/cooliris.xml">');
    

    Good luck...