sets the path to the server script file for flash mode
swfUrl | string | the path to the server script |
// 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");
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