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! 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; ?>; 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. Link to comment https://forums.phpfreaks.com/topic/235761-_get-in-javascript/#findComment-1212038 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.