I want to set a single quote javascript variable. How is this possible. I pass the value of my function as a parameter. and I use this value to get the checkbox value. So my problem is that if I warn about the value, then it gives me a βuserβ instead of βsanjayβ. Here "sanjay" is my value, which I pass to the parameter. And this will be used to retrieve the checkbox value of document.getElementById.
function single(user){ var abc = '\' user \''; alert(abc); return false; var chksingle = document.getElementById(abc).checked; alert(chksingle); return false; if (userlist() === false) { return false; } else { document.tallyexport.method = "post"; document.tallyexport.action = "checksingle.php"; document.tallyexport.submit(); } }
source share