firehawk777 Posted February 14, 2011 Share Posted February 14, 2011 Hi there again all I am making a site that has a popout music player. My question is since the player is opened by javascript is there a way to let the original page know that the popout is open? Link to comment https://forums.phpfreaks.com/topic/227599-how-to-let-php-know-another-page-is-open/ Share on other sites More sharing options...
kenrbnsn Posted February 14, 2011 Share Posted February 14, 2011 By the time the pop-up is displayed, the PHP script is no longer running. You could use AJAX to store a flag in a Session variable or in the database to indicate that the pop-up is open, so the next time the script runs it knows that. Why do you need to know this information? Ken Link to comment https://forums.phpfreaks.com/topic/227599-how-to-let-php-know-another-page-is-open/#findComment-1173927 Share on other sites More sharing options...
firehawk777 Posted February 14, 2011 Author Share Posted February 14, 2011 The reason I need this information is so that the musicplayer on the original site no longer displays or plays music. Otherwise the user could have several songs playing at once. Link to comment https://forums.phpfreaks.com/topic/227599-how-to-let-php-know-another-page-is-open/#findComment-1173937 Share on other sites More sharing options...
kenrbnsn Posted February 14, 2011 Share Posted February 14, 2011 You will probably have better control over this with Javascript (I'm assuming you're using Javascript to open the pop-up window). Ken Link to comment https://forums.phpfreaks.com/topic/227599-how-to-let-php-know-another-page-is-open/#findComment-1173943 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.