I am trying to add the following code work in a php file but it is not working when i use base64_encode of php…
alert('print-generalbill.php?a=r&i='+<?php echo base64_encode($InvID); ?>);
But it works fine when i use the code without base64_encode
alert('print-generalbill.php?a=r&i='+<?php echo $InvID; ?>);
What should be the solution to this?
You might want to do this. Its a matter of actually quoting the string. Base 64 strings contain valid javascript operators such as
=.