Skip to content

Ajax function - 404 in the Firefox - version 3.5.1 #4850

@lrochaoliveira

Description

@lrochaoliveira

Description

I've an application using the ajax call in the combox onchange event. When the function was called, return a 404 browser's message. The browser's stack trace:


**send** https://code.jquery.com/jquery-3.5.1.js:10099:10
**ajax** https://code.jquery.com/jquery-3.5.1.js:9682:15
**carregaComboAtivoAjax** http://localhost:8080/SSP/bootstrap/js/funcoes.js:6:7
**onchange** http://localhost:8080/SSP/cadCadastraCampo:1:22
**receiveMessage** resource://gre/actors/SelectChild.jsm:271:21
**receiveMessage** resource://gre/actors/SelectChild.jsm:471:21

  1. My js ajax function:
1 function carregaComboAtivoAjax(url) {
2    var uoId = document.getElementById('idUo').value;
3    $.ajax({
4        type: 'get',
5        url: url,
6        dataType: 'html',
7       data: { uoId: uoId },
8       success: function(data) {
9            if (data != null) {
10                $("body").html(data);
11            }
12        }
13    });
14 }
  1. My Spring Boot - Controller:
@RequestMapping(value = "./carregaComboAtivoCadastraCampo", method = RequestMethod.GET)
	public String carregaComboAtivo(@RequestParam UUID uoId,  Model model) {
          ....
}
  • What do you expect to happen? I expect the URL call my controller methods (iten 2);

  • What actually happens? I debug my ajax function in the console.log, and in the line 3, the $.ajax({ command stop working. I read some stack overflow community post that suggest to use the fisical file jquery.3.5.1 insetead of CDN url. I changed and the problem persist. I'm using jquery.3.5.1.js and jquery.3.5.1.min.js (CDN url in the head tag) + Spring Boot + Bootstrap + thymeleaf + Firefox Browser.
    The 404 is fake, because the URL is corret: http://localhost:8080/SSP/carregaComboAtivoCadastraCampo?uoId=ce83ca47-6b29-4878-98ee-6c0cb1a1cf66 and is calling the js function carregaComboAtivoAjax(url);
    In the POM.xml there is not expliced dependecy, because my application is war.

  • Which browsers are affected? Yes, the browser is affected. In the browser stack trace, I see the code lines that represente a exception code. I openned a bug issue in the firefox. However, I need to descart the jquery issue.

Link to test case

http://localhost:8080/SSP/cadCadastraCampo
P.S: Our application is in test and the code is protected. I can not share a public URL. But I think with the browser stack trace, it will possible to find the mistake.

Thanks for wall,
Best,
Luciana

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions