Using ajax.php for video presentation in kaltura
I am writing codes for video presentation. But facing problem in using ajax.php. I found these codes inside http://www.kaltura.com/projects/VideoPresentationDemo/ ,
but I don't know how to call ajax.php , anybody can help me?
function entries_added(entries)
{
$("#doc_uploading").html('Processing '+kuploader_selected_filename);
entry = entries[0];
set_document_entry_id(entry.entryId);
// entry id = entry.entryId
// request conversion using ajax
$.ajax({
url: 'ajax.php?action=convert&entryId='+entry.entryId,
type: 'get',
success: fun开发者_JS百科ction(download_url){
set_converted_doc_swf_url(download_url);
var timeoutId = setTimeout('updateDocConversionStatus()',10000);
set_docConvertCheckerId(timeoutId);
}
});
}
Please help me to download ajax.php.
I suspect you may not have jQuery loaded; the $.ajax({ url: 'ajax.php' })
should be working to "download" ajax.php already.
On the Video Presentation Demo page you link to, you can enter this code into your browser's console; you should see an XMLHTTPRequest object printed, followed by 'success' if it works.
$.ajax({ url:'ajax.php', success: function(url) { console.log('success'); } });
On your own site, do you have an ajax.php
handler to make requests to?
精彩评论