• Jobs
  • About Us
  • professionals
    • Home
    • Jobs
    • Courses and challenges
    • Questions
    • Teachers
  • business
    • Home
    • Post vacancy
    • Our process
    • Pricing
    • Assessments
    • Payroll
    • Blog
    • Sales
    • Salary Calculator

0

201
Views
ASP.NET prevent jquery-ocupload plugin make form.submit()

Old ASP.NET Classic site(NETFramework 4) was working fine with this jQuery Plugin - https://github.com/andreyfedoseev/jquery-ocupload/blob/master/jquery.ocupload.js - page with this uploader worked outside ASP.NET.

But I rebuild this site and PopUp Windows with uploader I have placed inside ASP.NET form tag and place it on ASP.NET page.

After that this Uploader stop working. This Uploader has Submit function.

        submit: function () {
            if (this.onSubmit()) {

                $('input[type=hidden]', form).remove();

                $.each(options.params, function (key, value) {
                    form.append($(
                    '<input ' +
                        'type="hidden" ' +
                        'name="' + key + '" ' +
                        'value="' + value + '" ' +
                    '/>'
                ));
                });

                $('input[name=uploadtime]', form).val(getNTime());
                form.submit();

How to correct modify this submit function (where is correct place to add e.preventDefault()) and maybe need something modifying (additionally to EnableEventValidation="false") in ASP.NET?

On the screen below there is a wrong place, submit still don't working.

enter image description here

almost 3 years ago · Juan Pablo Isaza
1 answers
Answer question

0

I have understand what happens. Button "Обрати файл" (Select file) is dummy stub, this is not a real button

And real upload button follow mouse. If width of dummy button is wrong click never happens to real upload button.

Screen below demonstrate this scene. I increase <form height and width and add red border to form to better understanding.

enter image description here

almost 3 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Our process Sales
Legal
Terms and conditions Privacy policy
© 2025 PeakU Inc. All Rights Reserved.

Andres GPT

Recommend me some offers
I have an error