Reset lesson button not working in firefox
Closed this issue · 6 comments
Reset lesson is not working for any of the lessons in firefox.
Reason: An AJAX request is made to reset the lesson and when response comes, the page is refreshed. However in firefox on refreshing the page it is also sending the POST data again causing the completion of the lesson again. Hence the success message is displayed and the lesson is marked completed again.
Solution: Use a different way of refreshing the page.
Why are you using AJAX for this at all?
On Jun 29, 2014, at 3:28 AM, Shivam Dixit notifications@github.com wrote:
Closed #16.
—
Reply to this email directly or view it on GitHub.
Just thought it will be a good idea to reset the lesson without actually changing the page.
Resetting a lesson is a big enough task. People will expect refreshes, possibly a few!
On Jun 29, 2014, at 4:19 AM, Shivam Dixit notifications@github.com wrote:
Just thought it will be a good idea to reset the lesson without actually changing the page.
—
Reply to this email directly or view it on GitHub.
So shall I change it ?
Right now we are making an AJAX request to a controller which calls the reset() method of the lesson and returns a json response {status: true}. On receiving the response, page is refreshed.
I’d say avoid AJAX as much as possible. Keep it simple and clean.
Notice: This message is digitally signed, its source and integrity are verifiable.
If you mail client does not support S/MIME verification, it will display a file (smime.p7s), which includes the X.509 certificate and the signature body. Read more at Certified E-Mail with Comodo and Thunderbird in AbiusX.com
On Jun 29, 2014, at 4:26 AM, Shivam Dixit notifications@github.com wrote:
So shall I change it ?
Right now we are making an AJAX request to a controller which calls the reset() method of the lesson and returns a json response {status: true}. On receiving the response, page is refreshed.—
Reply to this email directly or view it on GitHub.
Thanks. I'll keep this in mind and try to avoid it as much as possible.
The other places where I'm using AJAX currently are:
- To turn visibility ON/OFF of a lesson in workshop mode. As soon as admin clicks on ON/OFF button in front of a lesson name an AJAX request is made.
- To fetch the list of all the users of workshop mode which is displayed on admin dashboard when admin has to delete users.