0

I have a Masterpage like that :

...
<head id="Head1" runat="server">
     <asp:ContentPlaceHolder ID="HeadContent" runat="server" />
</head>
...

And in my Aspx page :

...

<asp:Content ID="HeadContentFromPage" ContentPlaceHolderID="HeadContent" runat="server">
   <link rel="Stylesheet" type="text/css" href="uploadify.css" />
   <script src="jquery-1.3.2.min.js" type="text/javascript"></script>
   <script src="uploadify.v2.1.0.min.js" type="text/javascript"></script>

   <script type="text/javascript">
      jQuery.noConflict();
      jQuery(document).ready(function() {     
         jQuery("#<%=fupImagem.ClientID %>").fileUpload({
                'uploader': 'uploadify.swf',
                'cancelImg': 'cancel.png',
                'buttonText': 'Browse Files',
                'script': 'Uploader.ashx',
                'folder': 'uploads',
                'fileDesc': 'Image Files',
                'fileExt': '*.jpg;*.jpeg;*.gif;*.png',
                'multi': true,
                'auto': true
         });
      }
   );
   </script>

</asp:Content>
...
 <asp:FileUpload ID="fupImage" runat="server" CssClass="txtBig" />
...

I got that error when loading that page :

Erro: jQuery("#ctl00_ContentPlaceHolder1_fupImagem").fileUpload is not a function

Any idea whats wrong?

Paul

2
  • Which version of uploadify are you using? One of the more recent updates changed the upload command from fileUpload() to uploadifyUpload(). Commented Sep 1, 2009 at 15:00
  • Just an aside, you don't need to call jQuery.noConflict() if you are going to reference jQuery using its full name. This is only for if you are going to use the $ alias, so it doesn't conflict with other js libs. Commented Feb 18, 2010 at 18:23

1 Answer 1

6
jQuery("#<%=fupImagem.ClientID %>").uploadify({

It changed from fileUpload to uploadify in version 2.0.0. See the changelog:

Function changed to uploadify()
fileUpload()           – uploadify()
fileUploadStart()      - uploadifyUpload()
fileUploadSettings()   - uploadifySettings()
fileUploadCancel()     - uploadifyCancel()
fileUploadClearQueue() – uploadifyClearQueue()
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.