jamkelvl Posted January 30, 2010 Share Posted January 30, 2010 Can you put php in javascript? Something like... <script> function gotosite() { var URL = document.gotoform.shipTo.options[document.gotoform.shipTo.selectedIndex].value; window.location.href = '?billTo='<?php echo $_GET['billTo'] ?>'&shipTo='+encodeURIComponent(URL); } </script> Quote Link to comment Share on other sites More sharing options...
jamkelvl Posted January 30, 2010 Author Share Posted January 30, 2010 I do this all the time.. but I never tested the above code, just assumed it didn't work and well.. it works. Thanks for letting me post! 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.