AjaxCRUD Class Documentation / Reference Material

onFileUploadExecuteCallBackFunction

calls a local function when a file is uploaded
void onFileUploadExecuteCallBackFunction ( String functionName )

use this function when you want to apply certain logic (or display a certain message) when a file is uploaded. Use of this function is similiar in a way to a java interface: you must define a function with the name specifed in the function call.

This function must take ONE parameter (an array). The indexes of this array are as follows:

  • id (the id of the row for which the file was uploaded)
  • (your primary key) (the id of the row for which the file was uploaded)
  • field (the fieldname to which the file was uploaded [the filename was placed in this field: see setFileUpload])
  • fileName (the name of the file) [may have been renamed]
  • fileSize (the filesize of the file)
  • fldType (the filetype of the file)

  • Details

    Requires setFileUpload, your callback function
    Type function
    Returns void

    Parameters

    functionName
    name of the local function to be invoked when a file is uploaded

    Example

    $demo->setFileUpload("fldFilename");
    $demo->onFileUploadExecuteCallBackFunction("uploadDocument");
    
    function uploadDocument($array){
      $id         = $array[id];  //this will always be the value
      $id         = $array[pkID]; //same as above IF the pk is pkID
      $fileName   = $array[fileName];
      $fileSize   = $array[fileSize];
      $fileType   = $array[fldType];
      
      if ($fileName != ''){
        $success = qr("UPDATE tblDemo SET fldFilesize = '$fileSize'
                                      WHERE pkDemoID = $id");
      }
    }
    

    See also

    Non-Commercial Use

    If you use ajaxCRUD™ on a website for non-profit/charity use OR for educational purposes, then you do NOT need our permission.

    Download and play away! :-)


    FREE

    Download

    For-Profit Organization

    Plan to use ajaxCRUD™ on a business/commercial website? You must purchase a license.

    What is a single website?

    A single website is defined as a single domain name which hosts a collection of web pages which serve a single entity or business. For example www.loudcanvas.com is a single website; ajaxcrud.com is a single website.

    Subdomains are allowable under the single commercial website license. Therefore, if you use the subdomain development.xyz.com then you also own/maintain www.xyz.com; we consider the primary domain a single website and the ajaxCRUD software may be installed on any number of its subdomains.

    AJAXCRUD - SINGLE DOMAIN COMMERCIAL LICENSE

    You are allowed to use this product or part(s) of it on a single web site only, belonging to either you or your client. You have to purchase the same product again if you want to use the same product in connection with another or other projects.


    Any analysis of the program, embedded data or license files by any means and by any entity whether human or otherwise and including but without limitation to discover details of internal operation, to reverse engineer, to de-compile object code, or to modify for the purposes of modifying behavior is forbidden.


    Any analysis of encoded files by any means and by any entity whether human or otherwise and including but without limitation to discover details of file format or modification for the purposes of modifying behavior or scope of their usage is forbidden.


    All imagery and fonts used in this product are an integral part of the product. You can use images and fonts only as a part of the web site you build using this product. You can use imagery and fonts to develop one project only. Any kind of separate usage or distribution is strictly prohibited.


    You are authorized to make necessary modifications to this product to fit your purposes in accordance with this license.


    The product is property of Tania Alekova. You shall not offer this product or part(s) of it, modified or unmodified, for redistribution or resale of any kind. You shall not sub-license, assign, or transfer this product or part(s) of it to any entity.


    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AND CONTRIBUTOR "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

    What is a commercial use?

    If you are NOT an official Charity/Non-Profit organization (or a student or educational facility) then you likely are a commercial/for-profit orgnization.

    If your organization makes a profit, you are a for-profit company. A commercial site is one created for a business, for which purpose is generating revenue or cash flow of any type (and that isn't under a non-profit organization). So if you're selling a product, selling advertisement, selling a service, or just marketing a commercial business, your site is commercial. A company website is commercial even if it doesn't sell anything on the site, as it's purpose is to market/promote a commercial company.

    $14.25/mo

    Buy Now

    Enterprise/Unlimited

    The Unlimited License permits you or your company to use ajaxCRUD™ on any/all commercial websites you develop now or in the future.

    For any questions please contact us..

    $499 (one-time)

    Buy Now