AJAX Side Effect

nate
@nate
11 years ago
917 posts
I am working on a site for a client. I pushed a js file that used the word "class", which I just learned is forbidden. I get a js error when the page loads.

OK fine, so I pushed an update (no ftp access).

But because jr5 uses AJAX to submit I can't clear the cache. I'm stuck and my client is losing money.

Maybe you can use "preventDefault" on the submit button and when the js isn't working it can submit the old fashioned way.
updated by @nate: 08/16/14 12:41:04PM
brian
@brian
11 years ago
10,149 posts
That's not going to work "preventDefault" won't do a thing if there is JS errors that prevent the JS from being compiled.

You should never be modifying JS on a "live" server where someone can lose money - you need to be testing it on your dev system long before it goes live.

You can truncate the jr_jrcore_cache table, but you'll need FTP access to delete the data/cache/Active_Skin/*.js files.

For now, switch skins, reset caches, then switch back (unless your JS is in a module, then disable the module, then reset caches).


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net

Tags