[RSS Feed/News] Custom JS & window.location.href

Status
Not open for further replies.

XenForo

Administrative
  • Thread starter
  • Admin
  • #1
On my dev site I have a some JS that does a redirect after a form submits and some ajax stuff happens

Code:

Code:
$(document).on('ajax:complete', function(event, xhr, settings){
    var parts = jQuery.parseJSON(xhr.responseText);
    if(parts['status'] != 'ok'){
        if('cartUrl' in parts){
            window.location.href = '/store/cart.php?target=cart&action=add&product_id='+parts['cartUrl'];

Everything works as it should ..... in dev.

When I push it to live the form submits and...

Read more

ادامه مطلب...
 
Status
Not open for further replies.
Back
Top Bottom