cancel
Showing results for 
Search instead for 
Did you mean: 

JQuery fails to run after first call.

markglass
Occasional Visitor

JQuery fails to run after first call.

I'm a Software Developer. My knowledge of IT is limited. I'm troubleshooting a Django Application that is using Bootstap v5 Accordion. When the user clicks on the submit button the first time the JQuery Ajax call works. It does not work after the first call. The jquery script is ignored.

 

This application functions as expected when it is run in an environment without Pulse Secure.

 

JQuery Code is as follows: 

jquery('#files').on('submit', function (event) {
    event.preventDefault();
    var frm = jquery('#files');
    var data = new FormData(this);

    jquery.ajax({
        type: frm.attr('method'),
        url: frm.attr('action'),
        processData: false,
        contentType: false,
        data: data,
        success: function (response) {
            jquery("#files").html(response);
        },
        error: function (data) {
            jquery("#MESSAGE-DIV").html("Something went wrong!");
        }
    });
});

 Files is the id for the form.

<form action="{% url 'save_attachments' pk=surveyrequest.pk %}" method="POST" enctype="multipart/form-data" id="files">
1 REPLY 1
zanyterp
Moderator

Re: JQuery fails to run after first call.

is this accessed through a web site (the web interface of the appliance)? or from a client?