Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0How to get percentage of upload progress with AjaxHow to get percentage of upload progress with Ajax
Previous
 
Next
New Post
4/28/2017 3:39 AM
 

Script:

$(document).ready(function () {
        $('#btnNext').click(function (e) {
            e.preventDefault();
        });
        var options = {
            beforeSend: function () {
                $("#progress").show();
                //clear everything
                $("#bar").width('0%');
                $("#message").html("");
                $("#percent").html("0%");
            },
            uploadProgress: function (event, position, total, percentComplete) {
                $("#bar").width(percentComplete + '%');
                $("#percent").html(percentComplete + '%');
            },
            success: function () {
                $("#bar").width('100%');
                $("#percent").html('100%');
            },
            complete: function (response) {
                $("#message").html("<font color='green'>" + response.responseText + "</font>");
            },
            error: function () {
                $("#message").html("<font color='red'> ERROR: unable to upload files</font>");
            }
        };
        $("#form1").ajaxForm(options);
    });

HTML:

<form id="form1" method="post" enctype="multipart/form-data">
<div>
    <input type="file" size="60" name="myfile" />
    <input type="submit" value="Ajax File Upload" />
    <div id="progress">
        <div id="bar"></div>
        <div id="percent">0%</div>
    </div>
    <br />
    <div id="message"></div>
</div>

 

I was tested with Webform (C#). It worked. But, Dotnetnuke not working. (Postback and nothing is changed). Have a different way for Dotnetnuke to get percentage of progress of page load? 

-- Thank for reading--

 
New Post
4/29/2017 6:34 PM
 

Hi Nam,

DNN already has it's own FORM tag. You can not have another form tag inside of DNN's own form tag. You might be missing some basic DNN module development understanding. Maybe you can start here in the doc center.

Best regards,

Aderson


Aderson Oliveira
Your DNN Wingman
DeskPal.com
 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0How to get percentage of upload progress with AjaxHow to get percentage of upload progress with Ajax


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out