A problem when Inject ajax to colorbox
I have a wordpress plugin to play vedio. The developer has long gone. Now the play vedio button not working. From Firebug I can 开发者_如何学运维see the code works till bpl_split_response(response); Firebug says it's not defined. I checked ajax file that comes with the plugin, there isn't anything about "bpl_split_response". Would anybody point me where else to check the problem?
jQuery(document).ready( function() {
var j = jQuery;
j("a.link-play").live('click',
function() {
var link = j(this).attr('id')
link = link.split('-');
j.post( ajaxurl, {
action: 'link_lightbox',
'cookie': encodeURIComponent(document.cookie),
'link_id': link[2]
},
function(response)
{
var rs = bpl_split_response(response);
if ( rs[0] >= 1 ) {
j.fn.colorbox({
html: rs[1],
maxWidth: '90%',
maxHeight: '90%'
});
}
});
return false;
}
);
});
bpl_split_response
is a function that must have been defined in some js file which is not getting included anymore in the page. That file may have been removed or the function has been deleted.
This function is not part of the ajax response. It works on the response. Therefore you would need to find that piece of code or rewrite it if possible.
Good luck with that :)
精彩评论