Check documentation for the latest version of dhtmlxSuite setSWFURL DHTMLX Docs

setSWFURL

sets the path to the server script file for flash mode

void setSWFURL(string swfUrl);
swfUrlstringthe path to the server script

Example

// on init state
var myForm = new dhtmlXForm("parentId", [
    {
        type:   "upload",
        name:   "my_uploader",
        ...,
        swfUrl: "../../samples/07_uploader/php/dhtmlxform_item_upload.php"
    }
]);
 
// using method
var myUploader = myForm.getUploader("my_uploader");
myUploader.setSWFURL("../../samples/07_uploader/php/dhtmlxform_item_upload.php");

Details

read the details on the swfURL param

path should be related to the client swf file, since some last versions of flash in Internet Explorer this path is relative to index page, so we recommend you keep index html page and swf file in the same folder, in this case swfUrl will be relative both to swf file and to index page

i.e.

// tree struct
/*
/script/my_page.html
/script/uploader.swf
/script/server/dhtmlxform_item_upload.php
/script/server/uploaded_files/
*/
 
var myForm = new dhtmlXForm("parentId", [
    {
        type:   "upload",
        name:   "my_uploader",
        url:    "php/dhtmlxform_item_upload.php",
        swfPath: "../../codebase/ext/uploader.swf",
        swfUrl:  "../../samples/07_uploader/php/dhtmlxform_item_upload.php" 
    }
]);
Back to top