so i have this button, which is added dynamically in java script, but the thing is a want to send the files name as a parameter to the function, i already have the name in a var saved as file, the name is generally something like p164.epub. but for some reason it wont accept the parameter. if for instance i add a number instead of file, it accepts it and it works as it should
$('#result2').append("<button class ='removeBtn' onclick ='removeEbook("+file+")'>Remove</button>");
my function
function removeEbook(n)
{
alert("yay");
}
any thoughts?
"<button ... </button>"