Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

346
Visualizações
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

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

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

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda