Dev01
Dev01

Reputation: 4222

javascript getting function undefined error

I am getting the error stripecall is not defined even though function is defined and it is a global function:

Here is the code:

<button type="button" id="addcard" class="btn btn-success" 
     onclick="stripecall();">
    <i class="icon-save"></i> Submit
</button>

And function is defined like:

function stripecall() {
  // function stuff
}

What I've tried:

Everything seems to be okay but still getting that func is not defined error.

Can someone help me what I am missing ?

Thanks for the help

Upvotes: 0

Views: 75

Answers (1)

axelduch
axelduch

Reputation: 10849

The function stripecall is never defined because you have a syntax error line 1425

else {
    alert(msg);
    $('.btn-success').css("display", "");
    $('#loading').css("display", "none");
}
//location.href = "editcontact/index/
"; // <--- this is the problem
});

Upvotes: 1

Related Questions