Not signed in (Sign In)

Vanilla 1.0.3 is a product of Lussumo. More Information: Documentation, Community Support.

    • CommentAuthormurali
    • CommentTimeMar 10th 2008 edited
     
    Hello everyone i have a strange problem. I am using swf object in one of my pages as shown below. The problem is when i am uploading files through the ip the flash is working fine and the completeFunction javascript is called. But when i am accessin the website through the domain (Created a subdomain and redirecting the url to the ip) the complete function javascript is not executing!!!!

    Please help me to resolve this problem

    <object id="fileUpload" align="right" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"
    codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0"
    height="25" style="clear: left; z-index: 104; left: 139px; float: left; position: absolute;
    top: 69px" width="70">
    <param name="allowscriptaccess" value="always"/>
    <param name="movie" value="fileUpload.swf"/>
    <param name="quality" value="high"/>
    <param name="base" value="." />
    <param name="wmode" value="transparent"/>
    <param name="allownetworking" value="all"/>
    <param name="flashvars" value="uploadPage=Upload.axd?&completeFunction=javascript:window.alert('abcd');"/>
    <embed align="middle" allowscriptaccess="always" flashvars="uploadPage=Upload.axd?&completeFunction=javascript:window.alert('abcd');"
    height="100" name="fileUpload" pluginspage="http://www.macromedia.com/go/getflashplayer"
    quality="high" src="fileUpload.swf" base="." type="application/x-shockwave-flash" width="550"
    wmode="transparent" allownetworking="all" />
    </object>


    You can check out the example at

    It is working if i access through ip
    http://87.249.97.229/exere/default1.aspx

    but not when accessed through domain
    http://plm.exere.nl/Default1.aspx
    • CommentAuthorAran
    • CommentTimeMar 10th 2008
     
    murali

    You code doesn't seem to be implementing SWFObject at all. Also, even if you were using SWFObject, it is only used to embed the flash file on the page. Upload and cross doamin security type issues are really out of the scope of this forum.

    You may want to try the general flash forums like www.kirupa.com/forum etc.

    BTW - just looking at your non working example page (http://plm.exere.nl/Default1.aspx ) - you are getting a 404 after attempting an upload for http://87.249.97.229/exere/fileUpload.swd. So 1) you are displaying the flash file on one domain, but calling the upload location on another domain which means you will run into security sandbox issues 2) it is trying to find the flash debugging file fileUpload.swd which you haven't placed on the server.

    Best of luck,
    Aran
    • CommentAuthormurali
    • CommentTimeMar 10th 2008 edited
     
    Aran,

    Thanks for your comments. The Flash is been called properly but the only problem i am facing is the javascript not been called "completeFunction=javascript:window.alert('abcd');" I am trying to get the files into session after you click upload that part is working fine but after uploading of files to session i want the alert javascript to be called which is not happening.


    Murali
    • CommentAuthorAran
    • CommentTimeMar 12th 2008
     
    Ok.

    Again, this is not an SWFObject related issue, so I suggest you try some other resources.

    Here's what I came up with in 5 min of Google searching - There are some good tutorials with full code for .NET etc:

    http://www.codeproject.com/KB/aspnet/FlashUpload.aspx
    http://algorithmist.wordpress.com/2007/10/19/flex-file-upload-with-aspnet/

    As well as a >NET component with full javavscript callbacks etc for free here:
    http://www.element-it.com/MultiPowUpload.aspx

    demo with JS callbacks:
    http://www.element-it.com/Examples/MultiPowUpload/JavaScriptUpload.html

    (view the source to see the progress / onComplete handlers)

    Aran