Marios Marios - 7 months ago 15
Javascript Question

how to give variable into window.location

I have a javascript which I need to give a variable. I cannot figure it out, it is not working. Anyone that can help?

Thanks

window.location('<?php echo "edit_expedite.php?id=$id"?>');

Answer

Try window.location('edit_expedite.php?id='+"<?php echo $id; ?>");