response my json

Last post 07-09-2009, 10:46 PM by ives. 3 replies.
Sort Posts: Previous Next
  •  07-09-2009, 10:03 AM 53856

    response my json

    [{FileGuid:'E6CF0C88-8FA0-A3A1-1315-8E5717CE3252',FileSize:'8091',FileName:'160X80-1.jpg'}]

    This is your normal response json object, my program must to return extra data of json,
    I have found to echo my json by edit "ajax-multiplefiles-handler.php", and I can get the json of my need,
    but I find the progress bar is not running, whether the three parameter FileGuid, FileSize and FileName must be included in json?
    What topic may I know to edit my own json?

  •  07-09-2009, 11:12 AM 53868 in reply to 53856

    Re: response my json

    Can you try the following code?
     
    1. <?php require_once "phpuploader/include_phpuploader.php" ?>   
    2. <html>   
    3. <body>   
    4.         <form id="form1" method="POST">   
    5.             <?php   
    6.                 $uploader=new PhpUploader();   
    7.                 $uploader->Name="myuploader";   
    8.                 $uploader->Render();   
    9.             ?>          
    10.         </form>   
    11. </body>   
    12. </html>  

    If it works, please try the following code:
     
    1. <?php require_once "phpuploader/include_phpuploader.php" ?>   
    2. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">   
    3. <html xmlns="http://www.w3.org/1999/xhtml">   
    4. <head>   
    5.     <title>   
    6.         Form - Single File Upload   
    7.     </title>   
    8.     <link href="demo.css" rel="stylesheet" type="text/css" />   
    9. </head>   
    10. <body>   
    11.     <div class="demo">   
    12.                            
    13.         <h2>Single File Upload</h2>   
    14.         <p> A basic sample demonstrating the use of the Upload control.</p>   
    15.            
    16.         <!-- do not need enctype="multipart/form-data" -->   
    17.         <form id="form1" method="POST">   
    18.             <?php   
    19.   
    20.             $uploader=new PhpUploader();   
    21.             $uploader->MaxSizeKB=10240;   
    22.             $uploader->MultipleFilesUpload=false;   
    23.             $uploader->Name="myuploader";   
    24.             $uploader->InsertText="Upload File (Max 10M)";   
    25.             $uploader->Render();   
    26.   
    27.             ?>   
    28.         </form>   
    29.            
    30.         <br/><br/>   
    31.                
    32. <?php   
    33. $fileguid=@$_POST["myuploader"];   
    34. if($fileguid)   
    35. {   
    36.     $mvcfile=$uploader->GetUploadedFile($fileguid);   
    37.     if($mvcfile)   
    38.     {   
    39.         echo("<div style='font-family:Fixedsys'>");   
    40.         echo("Uploaded File:");   
    41.         echo("<br/>FileName : ");   
    42.         echo($mvcfile->FileName);   
    43.         echo("<br/>FileSize : ");   
    44.         echo($mvcfile->FileSize);   
    45.         echo("<br/>FilePath : ");   
    46.         echo($mvcfile->FilePath);   
    47.         echo("</div>");   
    48.            
    49.         //Moves the uploaded file to a new location.   
    50.         //$mvcfile->MoveTo("/uploads");   
    51.         //Copys the uploaded file to a new location.   
    52.         //$mvcfile->CopyTo("/uploads");   
    53.         //Deletes this instance.   
    54.         //$mvcfile->Delete();   
    55.     }   
    56. }   
    57. ?>   
    58.                            
    59.     </div>   
    60. </body>   
    61. </html>  

    asp.net Chat http://cutesoft.net/ASP.NET+Chat/default.aspx
    Web Messenger: http://cutesoft.net/Web-Messenger/default.aspx
    asp.net wysiwyg editor: http://cutesoft.net/ASP.NET+WYSIWYG+Editor/default.aspx
    asp wysiwyg html editor: http://cutesoft.net/ASP
    asp.net Image Gallery: http://cutesoft.net/ASP.NET+Image+Gallery/default.aspx
    Live Support: http://cutesoft.net/live-support/default.aspx

  •  07-09-2009, 10:00 PM 53876 in reply to 53856

    Re: response my json

    Hi,
     
    You should make sure the progress bar works before doing other thing.
     
    If the progress bar not run , the reason should be there's some error of your new code.
     
    Regards,
    Terry
     
  •  07-09-2009, 10:46 PM 53882 in reply to 53868

    Re: response my json

    sorry, it can show progress bar normally by use my json object, it may my server problem yesterday.
View as RSS news feed in XML