i am trying to use the substring method inside a Js code wich echoes some php variable but it does not work.
$('#tarif_public_total').val( <?php echo $_tarif_public; ?> * $('#tarif_public').val() )
u=$('#tarif_membre').val()* <?php echo $_tarif_membre; ?> + $('#tarif_public').val()* <?php echo $_tarif_public; ?>
uu=u.substring(0,6)
$('#total_total').val(uu)
what im doing wrong here?