gweilo Posted June 10, 2020 Share Posted June 10, 2020 How can i put an variable for example $variable = 'something'; and then how do i put this into this js script <script>$(document).ready(function() {$('#open$variable').dataTable();});</script> note: Im trying to put this '$variable' inside ' ' right after #open. Quote Link to comment Share on other sites More sharing options...
Barand Posted June 10, 2020 Share Posted June 10, 2020 Put the variable value into a hidden field in the html. In the JS, get the value from the hidden field. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.