Page 1 of 2

When I use a javascript code to execute a create service, it appear "Uncaught TypeError: Cannot read property 'loading'

Posted: Sun Mar 15, 2015 2:24 pm
by Mark Wong

I have use a Youtube API to upload a video and when it success and response, I set the local storage to store the video_id. And it works perfectly fine before I put the JS code to execute a create service.
Image
Here is a snapshot.

A simple replacement for this maybe if the value of the local storage variable change, execute service.


When I use a javascript code to execute a create service, it appear "Uncaught TypeError: Cannot read property 'loading'

Posted: Sun Mar 15, 2015 2:50 pm
by Illya Stepanov

Hi Mark -

Could you please show us your code that you're using?


When I use a javascript code to execute a create service, it appear "Uncaught TypeError: Cannot read property 'loading'

Posted: Sun Mar 15, 2015 3:20 pm
by Mark Wong

Part of the code (modified from https://developers.google.com/youtube...)
codeajax.done(function(response) {
var videoId = response.id;
$('#video-id').text(videoId);
$('.post-upload').show();
localStorage.setItem("video_id", videoId);
Youtube_Video_Create.execute({});
checkVideoStatus(videoId, INITIAL_STATUS_POLLING_INTERVAL_MS);
});
/code


When I use a javascript code to execute a create service, it appear "Uncaught TypeError: Cannot read property 'loading'

Posted: Sun Mar 15, 2015 4:41 pm
by Mark Wong

I thought set the label to get the videoId and when the label value change to invoke service will work,
but it doesn't even though the label change the text?


When I use a javascript code to execute a create service, it appear "Uncaught TypeError: Cannot read property 'loading'

Posted: Mon Mar 16, 2015 3:01 pm
by Egor Kotov6832188

Hello Mark,
it's looks like you have a custom js code in your Youtube_Video_Create service in "Before send request"


When I use a javascript code to execute a create service, it appear "Uncaught TypeError: Cannot read property 'loading'

Posted: Mon Mar 16, 2015 3:56 pm
by Mark Wong

Sorry I don't really get it.
If yes, I have it and what should I do to execute the service? Image
Here is a capture of it.
The first and second JS error occur when I execute service and third occurs when I click back button on the header
Basically the whole app will have error -.-


When I use a javascript code to execute a create service, it appear "Uncaught TypeError: Cannot read property 'loading'

Posted: Mon Mar 16, 2015 3:57 pm
by Mark Wong

https://getsatisfaction.com/apperyio/...
Here is the code that you may want to take a look


When I use a javascript code to execute a create service, it appear "Uncaught TypeError: Cannot read property 'loading'

Posted: Mon Mar 16, 2015 3:57 pm
by Mark Wong

https://getsatisfaction.com/apperyio/...
Here is the code that you may want to take a look


When I use a javascript code to execute a create service, it appear "Uncaught TypeError: Cannot read property 'loading'

Posted: Mon Mar 16, 2015 3:59 pm
by Mark Wong

Should I put the code on the StackoverFlow to ask for help?


When I use a javascript code to execute a create service, it appear "Uncaught TypeError: Cannot read property 'loading'

Posted: Sat Mar 21, 2015 11:10 am
by Mark Wong

Any Progress?