karimali831 Posted May 7, 2011 Share Posted May 7, 2011 Hello! With this code: new Ajax.Updater('ULLIST_0', top.location = '?site=standings1&ladderID=24&start=21', { I want to be able to use ladderID=$_GET['ladderID'] like in PHP, can I do this with js? also can't I use variable e.g. top.location = $variable, which will suit me much better. thanks for help! Quote Link to comment https://forums.phpfreaks.com/topic/235761-_get-in-javascript/ Share on other sites More sharing options...
sunfighter Posted May 7, 2011 Share Posted May 7, 2011 top.location = <?php echo $variable; ?>; Quote Link to comment https://forums.phpfreaks.com/topic/235761-_get-in-javascript/#findComment-1211952 Share on other sites More sharing options...
karimali831 Posted May 7, 2011 Author Share Posted May 7, 2011 :D didn't know I could php in js, thank you now working. Quote Link to comment https://forums.phpfreaks.com/topic/235761-_get-in-javascript/#findComment-1212038 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.