Reputation: 1303
This my dialog box code:
$("#manageGroupShow").dialog({resizable: false,draggable: false,position:['center',150],title: "Manage Group",width:"50%",modal: true,show: { effect:"drop",duration:1000,direction:"up" },hide: { effect:"drop",duration:1000,direction:"up"}});
});
manageGroupShow html code:
<div id="manageGroupShow" class="brdBlack" style="width: 50%;display: none;">
</div>
dynamically append inside the manageGroupShow div code:
$("#manageGroupShow").append("<span><a
href="javascript:cancel('+dynamicvalues')>cancel</a>"</span>")
this href link not fired inside the dialogbox.how to call javascript call inside dialogbox. the span append dynamically multi times.so how to solve this problem?
Upvotes: 0
Views: 489
Reputation: 1584
What he said but use single quotes in JS string literals so that you never need to escape your html double quotes. There is never a need for double quotes in JS string literals.
$('#manageGroupShow')append('<span><a href="javascript:cancel('+dynamicvalues+')">cancel</a></span>');
Upvotes: 0
Reputation:
Open-close the quotes correctly!
append("<span><a href=\"javascript:cancel('dynamicvalues')\">cancel</a></span>")
if dynamicvalues
is a variable
append("<span><a href=\"javascript:cancel('"+dynamicvalues+"')\">cancel</a></span>")
Upvotes: 1