Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6116641
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T15:13:46+00:00 2026-05-23T15:13:46+00:00

Here is my $.getJSON function (this is suppose to hit a .ashx file and

  • 0

Here is my $.getJSON function (this is suppose to hit a .ashx file and return a json serialized object, which it does, i have tested it):

$.getJSON($('#fileupload form').prop('action'), function (files) {
        var fu = $('#fileupload').data('fileupload');
        alert("this is the files: " + files.toString);
        fu._adjustMaxNumberOfFiles(-files.length);
        fu._renderDownload(files)
            .appendTo($('#fileupload .files'))
            .fadeIn(function () {
                // Fix for IE7 and lower:
                $(this).show();
            });
    });

EDIT:

alert($(‘#fileupload form’).prop(‘action’)) < returns ‘undefined’

somehow my js is being loaded before the markup so it probably cant find #fileupload on the page.

Here is the FULL markup:

<style type="text/css">

    @import url('http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.13/themes/base/jquery-ui.css');
    @import url('/_layouts/IrvineCompany.SharePoint.CLM/css/jquery.fileupload-ui.css');
    @import url('/_layouts/IrvineCompany.SharePoint.CLM/css/style.css');
</style>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.13/jquery-ui.min.js"></script>
<script src="http://ajax.aspnetcdn.com/ajax/jquery.templates/beta1/jquery.tmpl.min.js"></script>    

<script type="text/javascript" src="/_layouts/IrvineCompany.SharePoint.CLM/js/UploadFile/jquery.iframe-transport.js"></script>
<script type="text/javascript" src="/_layouts/IrvineCompany.SharePoint.CLM/js/UploadFile/jquery.fileupload.js"></script>
<script type="text/javascript" src="/_layouts/IrvineCompany.SharePoint.CLM/js/UploadFile/jquery.fileupload-ui.js"></script>
<script type="text/javascript" src="/_layouts/IrvineCompany.SharePoint.CLM/js/UploadFile/application.js"></script>
<div id="fileupload">
    <form action="/_layouts/IrvineCompany.SharePoint.CLM/aspx/Upload.ashx" method="post" enctype="multipart/form-data">
        <div class="fileupload-buttonbar">
            <label class="fileinput-button">
                <span>Add files...</span>
                <input type="file" name="files[]" multiple="multiple" />
            </label>
       <%-- <button type="submit" class="start">Start upload</button>
            <button type="reset" class="cancel">Cancel upload</button> --%>
            <button type="button" class="delete">Delete all files</button>
            <div class="fileupload-progressbar"></div>
        </div>
    </form>
    <div class="fileupload-content">
        <table class="files"></table>
    </div>
</div>
<script id="template-upload" type="text/x-jquery-tmpl">
    <tr class="template-upload{{if error}} ui-state-error{{/if}}">
        <td class="preview"></td>
        <td class="name">${name}</td>
        <td class="size">${sizef}</td>
        {{if error}}
            <td class="error" colspan="2">Error:
                {{if error === 'maxFileSize'}}File is too big
                {{else error === 'minFileSize'}}File is too small
                {{else error === 'acceptFileTypes'}}Filetype not allowed
                {{else error === 'maxNumberOfFiles'}}Max number of files exceeded
                {{else}}${error}
                {{/if}}
            </td>
        {{else}}
            <td class="progress"><div></div></td>
            <td class="start"><button>Start</button></td>
        {{/if}}
        <td class="cancel"><button>Cancel</button></td>
    </tr>
</script>
<script id="template-download" type="text/x-jquery-tmpl">
    <tr class="template-download{{if error}} ui-state-error{{/if}}">
        {{if error}}
            <td></td>
            <td class="name">${name}</td>
            <td class="size">${sizef}</td>
            <td class="error" colspan="2">Error:
                {{if error === 1}}File exceeds upload_max_filesize (php.ini directive)
                {{else error === 2}}File exceeds MAX_FILE_SIZE (HTML form directive)
                {{else error === 3}}File was only partially uploaded
                {{else error === 4}}No File was uploaded
                {{else error === 5}}Missing a temporary folder
                {{else error === 6}}Failed to write file to disk
                {{else error === 7}}File upload stopped by extension
                {{else error === 'maxFileSize'}}File is too big
                {{else error === 'minFileSize'}}File is too small
                {{else error === 'acceptFileTypes'}}Filetype not allowed
                {{else error === 'maxNumberOfFiles'}}Max number of files exceeded
                {{else error === 'uploadedBytes'}}Uploaded bytes exceed file size
                {{else error === 'emptyResult'}}Empty file upload result
                {{else}}${error}
                {{/if}}
            </td>
        {{else}}
            <td class="preview">
                {{if thumbnail_url}}
                    <a href="${url}" target="_blank"><img src="${thumbnail_url}"></a>
                {{/if}}
            </td>
            <td class="name">
                <a href="${url}"{{if thumbnail_url}} target="_blank"{{/if}}>${name}</a>
            </td>
            <td class="size">${sizef}</td>
            <td colspan="2"></td>
        {{/if}}
        <td class="delete">
            <button data-type="${delete_type}" data-url="${delete_url}">Delete</button>
        </td>
    </tr>
</script>

EDIT:

Checked my markup, for some reason i have my form tag in there, but it disappears when i check the actual markup for the website.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T15:13:47+00:00Added an answer on May 23, 2026 at 3:13 pm
    $.getJSON($('#fileupload form').attr("action"), function (files) {
            var fu = $('#fileupload').data('fileupload');
            alert("this is the files: " + files.toString);
            fu._adjustMaxNumberOfFiles(-files.length);
            fu._renderDownload(files)
                .appendTo($('#fileupload .files'))
                .fadeIn(function () {
                    // Fix for IE7 and lower:
                    $(this).show();
                });
        });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Why does this not work? anybody: In my code I have: $.getJSON(http://isp123.co.uk/cw/NorthWales/Test.txt?jsoncallback=?, function(data){ //This
Fist off, here's the jSON object I created with PHPs json_encode function { Gatwick:[
I have a JS object that look something like this. function Product() { this.prop1
Say I have some code like this function Chart(start, end, controller, method, chart) {
Javascript function does not work when function loadcontents(obj) { var params = $(obj).attr('href').split('?'); $.getJSON(IVIDPLAY_BASE_DIR+'content/load2.php?'+params[1],
I wrote this code: function json() { var url=http://192.172.2.23:8080/geoserver/wfs?request=GetFeature&version=1.1.0&outputFormat=json&typeName=topp:networkcoverage&CQL_FILTER= topp:CELL_ID='410-07-301-31781' Or topp:CELL_ID='nnn'&callback=?; jQuery.getJSON(url,function(data){alert(Symbol: +
Ok so i have the json object returned back from my script and I
What is the problem here? (Besides having redundant code). $.getJSON works as expected. However
Here's a problem I ran into recently. I have attributes strings of the form
Here is the issue I am having: I have a large query that needs

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.