Results 1 to 3 of 3

Thread: Trying to get this function to be available

  1. #1

    Thread Starter
    MS SQL Powerposter szlamany's Avatar
    Join Date
    Mar 2004
    Location
    Connecticut
    Posts
    18,263

    Trying to get this function to be available

    I've got this .JS file I downloaded - looks like this

    Code:
    /**
     * Class that creates upload widget with drag-and-drop and file list
     * @inherits qq.FileUploaderBasic
     */
    qq.FileUploader = function(o){
        // call parent constructor
        qq.FileUploaderBasic.apply(this, arguments);
    
        // additional options
        qq.extend(this._options, {
    I was watching a youtube video explaining how to use this...

    So back in my script - I'm trying to write a function - that I will call from my main page script

    Code:
            function initFileUploader() {
                new qq.FileUploader({
                    element: $("#upload")[0]
                });
            }
    But qq.FileUploader is not defined. This is not a strong area for me in JavaScript...

    What is up with the qq. prefix? What is that supposed to mean? How do I get access to that function in that .JS file??

    *** Read the sticky in the DB forum about how to get your question answered quickly!! ***

    Please remember to rate posts! Rate any post you find helpful - even in old threads! Use the link to the left - "Rate this Post".

    Some Informative Links:
    [ SQL Rules to Live By ] [ Reserved SQL keywords ] [ When to use INDEX HINTS! ] [ Passing Multi-item Parameters to STORED PROCEDURES ]
    [ Solution to non-domain Windows Authentication ] [ Crazy things we do to shrink log files ] [ SQL 2005 Features ] [ Loading Pictures from DB ]

    MS MVP 2006, 2007, 2008

  2. #2
    Frenzied Member tr333's Avatar
    Join Date
    Nov 2004
    Location
    /dev/st0
    Posts
    1,605

    Re: Trying to get this function to be available

    I'm guessing qq is defined somewhere? Without seeing the whole file(s), I can only take guesses here.

    Is the code written using IIFE's? In that case, qq might be an internal variable to an unnamed function.
    CSS layout comes in to the 21st century with flexbox!
    Just another Perl hacker,

  3. #3
    Frenzied Member tr333's Avatar
    Join Date
    Nov 2004
    Location
    /dev/st0
    Posts
    1,605

    Re: Trying to get this function to be available

    Have you checked to ensure that the .js file is loading correctly with a 200 OK response from the web server?
    CSS layout comes in to the 21st century with flexbox!
    Just another Perl hacker,

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width