JavaScript - ¿Como actualizar esta propiedad?

 
Vista:

¿Como actualizar esta propiedad?

Publicado por Pablo (1 intervención) el 23/02/2021 09:41:44
como puedo actualizar esta propiedad?, he estado haciendo lo que dice aquí https://api.jquery.com/jQuery.browser/ pero me sige el error, también he puesto
1
<script src="http://code.jquery.com/jquery-migrate-1.0.0.js"></script>
y me funciona en localhost pero en un hosting sigue el mismo error, eso funciona en localhost.

Datos PHP 7.3
jQuery v3.5.1


Función
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
ajaxFileUpload: function(s) {
    s = jQuery.extend({}, jQuery.ajaxSettings, s);
    var id = new Date().getTime();
    var form = jQuery.createUploadForm(id, s.fileElementId);
    var io = jQuery.createUploadIframe(id, s.secureuri);
    var frameId = 'jUploadFrame' + id;
    var formId = 'jUploadForm' + id;
    if (s.global && !jQuery.active++) jQuery.event.trigger('ajaxStart');
    var requestDone = false;
    var xml = {}
    if (s.global) jQuery.event.trigger('ajaxSend', [xml, s]);
    var uploadCallback = function(isTimeout) {
        var io = document.getElementById(frameId);
        try{
            if (io.contentWindow) {
                xml.responseText = io.contentWindow.document.body ? io.contentWindow.document.body.innerHTML : null;
                xml.responseXML = io.contentWindow.document.XMLDocument?io.contentWindow.document.XMLDocument:io.contentWindow.document;
            }
            else if (io.contentDocument) {
                xml.responseText = io.contentDocument.document.body?io.contentDocument.document.body.innerHTML:null;
                xml.responseXML = io.contentDocument.document.XMLDocument?io.contentDocument.document.XMLDocument:io.contentDocument.document;
            }
        } catch(e) { jQuery.handleError(s, xml, null, e); }
        if (xml || isTimeout == 'timeout') {
            requestDone = true;
            var status;
            try {
                status = isTimeout != 'timeout' ? 'success' : 'error';
                if (status != 'error') {
                    var data = jQuery.uploadHttpData(xml, s.dataType);
                    if (s.success) s.success(data, status);
                    if (s.global) jQuery.event.trigger('ajaxSuccess', [xml, s]);
                }
                else jQuery.handleError(s, xml, status);
            } catch(e)	{ status = 'error'; jQuery.handleError(s, xml, status, e); }
            if (s.global) jQuery.event.trigger('ajaxComplete', [xml, s]);
            if (s.global && !--jQuery.active) jQuery.event.trigger('ajaxStop');
            if (s.complete) s.complete(xml, status);
            jQuery(io).unbind();
            setTimeout(function() { try { $(io).remove(); $(form).remove(); } catch(e) { jQuery.handleError(s, xml, null, e); } }, 100);
            xml = null;
        }
    }
    if (s.timeout > 0) setTimeout(function(){ if(!requestDone) uploadCallback('timeout'); }, s.timeout);
    try{
        var form = $('#'+formId);
        $(form).attr({ action: s.url, method: 'post', target: frameId });
        if(form.encoding) form.encoding = 'multipart/form-data';
        else form.enctype = 'multipart/form-data';
        $(form).submit();
    } catch(e) { jQuery.handleError(s, xml, null, e); }
    if ($.browser.opera) document.getElementById(frameId).onload = uploadCallback;
    else {
        if (window.attachEvent) document.getElementById(frameId).attachEvent('onload', uploadCallback);
        else document.getElementById(frameId).addEventListener('load', uploadCallback, false);
    }
    return {abort: function () {}};
},



Linea del error
1
if ($.browser.opera) document.getElementById(frameId).onload = uploadCallback;


Captura
f_359821e12bc7



Gracias.
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder