I put a function call in checkbox onclick event, and want to append text to
a variable. But if I get value from a php variable, I get error on page,
but if I put output = output + "text", it works well. Can anyone help?
Thanks
function getS (id){
var output = "";
if (document.getElementById("id").checked)
{
output = output + <? echo $text; ?> ;
}}