0

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

enter image description here

What would be the reason and how to solve this?

3
  • Clearly that doesn't look like a string. Commented Feb 20, 2014 at 8:28
  • is there any way to do that from my markup Commented Feb 20, 2014 at 8:29
  • Also add the link of your fiddle ,so its easy to get error on your code! jsfiddle.net Commented Feb 20, 2014 at 8:36

2 Answers 2

2

Try to change:

$("#divPreviewPopUp").css("display:block");

to:

$("#divPreviewPopUp").css("display", "block");
Sign up to request clarification or add additional context in comments.

1 Comment

another option : $("#divPreviewPopUp").css({"display":"block"});
1

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#')">

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.