I am trying to create a window pop up using window.open method in javascript, it works fine simply without any dynamic variable passing, but i am not getting how to pass the php variable inside the function to make it functional in another window.
Here is what i have tried so far:
<?php
if(isset($d->retweeted_status->id_str)){
$tweetId = $d->retweeted_status->id_str;
} else{
$tweetId = $d->id_str;
}
$myUrl = "retweetDetails.php?id=".$tweetId;
<?
<a href="javascript:;" onclick="window.open('retweetDetails.php', 'my_new_window','width=625, height=400');" class="btn btn-default twitter_button_retweets"><?php echo $d->retweet_count; ?> Retweets </a>
I want to pass this $myUrl variable as a url parameter which will reflect in popup window.
Thanks
window.open('<?=$myUrl?>'?<?to?>before<atag