I send two parameters, a number ($row ["inv_id"]
) and a string ($status = "Close"
) to a function jquery php
$ inv_actions= <a onClick="invoiceStatusChange('.$row["inv_id"].','.$status.')" title="Close"><i class="icofont icofont-unlocked"></i></a>';
and I receive it in jquery
function invoiceStatusChange (invId, toStatus) {
alert (toStatus);
}
present this error
invoiceStatusChange (532, Close) Uncaught ReferenceError: Close is not defined
If I send the number alone there is no problem, if I send two numbers, there is no problem, but if I send the number and the string gives the error.
Can you help? Thank you