Problem invoking service from Javascript

I am having problems invoking a REST service through Javascript.

I've read through the forum and tried everything I can find but I still cant get it to work.

My rest service is called: checkJobStatus

And on page load I have a function call:

checkJobStatusFunction();

And the function, which isnt quite finished but the basics are there

function checkJobStatusFunction() {

// get user pin from local storage
var userPIN = localStorage.getItem('current_job_id');

// get current job id from local storage
var jobID = localStorage.getItem('user_id');

// invoke checkJobStatus REST service
checkJobStatus.execute({
data:{
'checkJobStatusID': jobID
},
success: function(e) {

alert(data);

},
});

}

I get the following error: Uncaught TypeError: undefined is not a function

Which points me to this line in the function: checkJobStatus.execute({

Can you see what I am doing wrong?
1 person has
this problem
+1
This topic is no longer open for comments or replies.