Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Apr 2012
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    JQuery/JavaScript help needed - How to point to ASP.NET's onClick event?

    Hi, on my ASPX page I have this JavaScript code:
    <script type="text/javascript" src="scripts/jquery-1.3.2.min.js"></script>
    <script type="text/javascript" src="scripts/jquery.uploadify.js"></script>

    <script type = "text/javascript">
    $(window).load(
    function() {
    $("#<%=FileUpload1.ClientID %>").fileUpload({
    'uploader': 'scripts/uploader.swf',
    'cancelImg': 'images/cancel.png',
    'buttonText': 'Browse Files',
    'script': 'Upload.ashx',
    'folder': 'uploads',
    'fileDesc': 'All Files',
    'fileExt': '*.*',
    'multi': true,
    'auto': true
    });
    }
    );
    </script>
    It shows a button to select and upload multiple files to a SharePoint document library.

    Question: As of now it sends the action to "Upload.ashx"; How to send action to a method on the same page's code behind instead?

    Thanks a lot for your help, really appreciated, as I am stuck on this.

  • #2
    The fat guy next door VIPStephan's Avatar
    Join Date
    Jan 2006
    Location
    Halle (Saale), Germany
    Posts
    8,677
    Thanks
    6
    Thanked 1,008 Times in 981 Posts

    Just change the file name to the current page’s?
    Code:
    …
    'script': 'currentpage.ashx',
    …


  •  

    Tags for this Thread

    Posting Permissions

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