Mark Wong
Posts: 0
Joined: Sat Feb 14, 2015 7:47 am

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

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.

Mark Wong
Posts: 0
Joined: Sat Feb 14, 2015 7:47 am

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

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

Mark Wong
Posts: 0
Joined: Sat Feb 14, 2015 7:47 am

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

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?

Egor Kotov6832188
Posts: 0
Joined: Wed Nov 19, 2014 5:15 pm

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

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

Mark Wong
Posts: 0
Joined: Sat Feb 14, 2015 7:47 am

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

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 -.-

Return to “Issues”