How can I update $uploader->UploadUrl="../php/cmds/PHPFileUploadCmd.php" after Page Load then after ajax resulthandler?

  •  03-02-2012, 3:57 AM

    How can I update $uploader->UploadUrl="../php/cmds/PHPFileUploadCmd.php" after Page Load then after ajax resulthandler?

    Dear Expert,
     
    the code:
            <?php
                $uploader=new PhpUploader();
                   $uploader->Name="myuploader";
                $uploader->MultipleFilesUpload=true;
                $uploader->InsertButtonID="uploadBtn";    
                $uploader->InsertText="Select multiple files (Max 10M)";
                $uploader->MaxSizeKB=10240;
                $uploader->AllowedFileExtensions="*.jpg,*.png,*.gif,*.bmp";
                $uploader->SaveDirectory="../pics/";
                $uploader->UploadUrl="../php/cmds/PhpFileUploadCmd.php";
                $uploader->FlashUploadMode="Partial";
                $uploader->Render();
            ?>
     will generate :
    <img id="myuploader_Loader_unique" contextvalue="9225222354c53c10fd7b2d3307b16a82" onerror="this.onload()" onload="this.style.display="none" ; CuteWebUI_AjaxUploader_Initialize(this.id);" borderstyle="border-style:solid;border-width:1px;border-style:#444444;" barstyle="Continuous" infostyle="padding-left:3px;font:normal 12px Tahoma;" barheight="20" panelwidth="360" numfilesshowcancelall="2" showprogressinfo="1" showprogressbar="1" multiplefilesupload="1" uploadtype="Auto" uploadcursor="Auto" uploadingmsg="Uploading.." cancelallmsg="Cancel all Uploads" canceluploadmsg="Cancel upload" maxsizekb="10240" maxhttpsizekb="204800" maxpartialsizekb="102400" flashloadmode="1" extensions="*.jpg,*.png,*.gif,*.bmp" insertbuttonid="uploadBtn" uploadurl="../php/cmds/PhpFileUploadCmd.php" resourcehandler="/albums/php/phpFileUploader/phpuploader/ajaxuploaderresource.php" resourcedirectory="/albums/php/phpFileUploader/phpuploader/resources" src="http://cutesoft.net/albums/php/phpFileUploader/phpuploader/ajaxuploaderresource.php?type=file&file=continuous.gif" serverlang="PHP" uploadmodulenotinstall="1" namespace="CuteWebUI" uniqueid="myuploader" style="display: none;"> 
     for the page first load.
     
    The  uploadurl="../php/cmds/PhpFileUploadCmd.php" will be preset into the <img  id="myuploader_Loader_unique"
    ></img> tag.
     
    However I have an ajax call  to insert something into mysql first and then the ajax result handler will return a new sid to me. e.g. 
    albumSid = '3'. 
    I need to put the albumSid = '3' into  uploadurl="../php/cmds/PhpFileUploadCmd.php" + "?albumSid=3" into it.
     
    How can I change it?
     
    Regards
     
    Man Pak Hong
    manpakhong@hotmail.com
     
     
     
     

    Man Pak Hong, Dave
View Complete Thread