Reputation: 1014
I have a program in which calling a script function in dblclick of a tr.Also Passing some arguments which is generated dynamically
Part of my markup is
<tr id="#ID#_#VERSION_ID#" ondblclick="ShowAssetPreviewPopup(#PreviewPath#, #UUID#, #GENERAL_VIRTUAL_PATH#)"
The preview path will be replaced by something like this 'http://example.somethingsomething.mp4' and in the same way other 2 parameteres too. Up to here every thing is ok and as I click that tr the following function will get evoked
function ShowAssetPreviewPopup(PreviewPath, UUID, LowresVirtualpath) {
$("#divPreviewPopUp").find("#divVideoPreview").html("example");
$("#divPreviewPopUp").css({"display:block"});
$("#divPreviewPopUp").css({ "top": (($(window).height() / 2) - ($("#divPreviewPopUp").height() / 2)) });
$("#divPreviewPopUp").css({ "left": (($(window).width() / 2) - ($("#divPreviewPopUp").width() / 2)) });
}
But an error is occurring in Firebug
What would be the reason and how to solve this?
Upvotes: 0
Views: 79
Reputation: 2005
I assume #PreviewPath# is a string variable from your template engine. You have to surround these string variables by single quotes.
<tr id="#ID#_#VERSION_ID#" ondblclick="ShowAssetPreviewPopup('#PreviewPath#', #UUID#, '#GENERAL_VIRTUAL_PATH#')">
Upvotes: 1
Reputation: 38112
Try to change:
$("#divPreviewPopUp").css("display:block");
to:
$("#divPreviewPopUp").css("display", "block");
Upvotes: 2