Message from JavaScript discussions

June 2019

— Hi; why when I make an operation get with ajax and applyit to the django module, the page on the client side will reload and refresh?

Message permanent page


I think that if you don't make the reload from the server or later in the AJAX promise it doesnt' reload by default

— Anyone online

— Hi,
When I call this with clicking on the checkbox at the client side the page will reload why? I want to prevent this refreshing

Message permanent page

— $.get('http://localhost:8000/indexes/'+ indexes, function(e){ //e.preventDefault();

— Indexes: regard to each value of the checkbox

— By default, ticking a checkbox does not reload a page, then you have done that in your code ;) do you have a more complete test-case or what piece of code is else associated with that checkbox?

Message permanent page

— Jjust this

— Asynchronous HTTP should not lead to have your page reloaded.

— It will send the value of each checkbox to the server side django, and will pass this value at a function to give me 2 images saved in a special directory

Message permanent page

— What is the function body?

— Maybe the problem are in the server side?