views:

1049

answers:

1

Hello guys... 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

+3  A: 
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()
karim79