Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

104
Views
editEvent reload page even if nothing change

When I click on an event in my calendar (made with fullcalendar3) it apparead a modal where I can change name, start and end of the event. When I close this modal it reload the page, no matter if i change something or not.

Is there a way to stop the page from reload if I dont make changes?

This is my function to edit events in JS:

    eventClick: function eventClick(event) {
    $('#editNewEvent').modal('show').one('hidden.bs.modal', function (e) {
            event.title = $('#editEname').val();
            event.start = $('#editStarts').val();
            event.end = $('#editEnds').val();
            event.descrizione = $('#editDescrizione').val();
            $.ajax({
                url: 'eventi/updateEvent.php',
                type: 'POST',
                data:  {start: event.start, _id: event.idAssenza, end: event.end, title: event.title, descrizione: event.descrizione},
                success: function() {
                        location.reload();
                } 
            });
            $('#calendar').fullCalendar('updateEvent', event._id);
        });
  }

I found online this kind of solution:

    success: function(data) {
               var result = data;
               location.reload();
      } 
   });
   return result;

But it doesnt change anything, still reload the page even if I dont modify anything

about 4 years ago · Santiago Gelvez
1 answers
Answer question

0

From an other question of mine I had this solution:

eventClick: function eventClick(event) {
    $('#editNewEvent').modal('show');
    //*salva* is the ID of my button
    $("#salva").click(function() {
            event.title = $('#editEname').val();
            event.start = $('#editStarts').val();
            event.end = $('#editEnds').val();
            event.descrizione = $('#editDescrizione').val();
            $.ajax({
                url: 'eventi/updateEvent.php',
                type: 'POST',
                data:  {start: event.start, _id: event.idAssenza, end: event.end, title: event.title, descrizione: event.descrizione},
                success: function() {
                        location.reload();
                } 
            });
            $('#calendar').fullCalendar('updateEvent', event._id);
        });
  }
about 4 years ago · Santiago Gelvez Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!