Is there a way to send a string by parameters in javascript
?
I have something like:
<i class="fa fa-folder-open" aria-hidden="true" style="cursor:pointer;" onclick="en('.$datas['contribuinte'].')"></i>
This button when clicking has to take the variable to the function, but sometimes the variable inside can contain zeros on the left, so the function recognizes as integer and removes the zeros, so I want to turn it into a string.
Function:
function en(x)
{
window.open("en/vers.php?cls="+x,"_blank");
}
Example: If the variable contains "000000001" I did not want the function to be "1".