I don't know much about programming, but somehow I managed to get the popup to work. However, I need the button inside the popup window to open a new tab inside the new window (popup). But I don’t need to open a new tab in the main browser, I want it to open in the same popup window.
Is it possible?
How can I do it?
I am showing both a pop-up code and a redirect code that is currently sending people to another tab in my web browser, but I need to do this in the same pop-up that is already open. Here is the code in the popup:
<!DOCTYPE html>
<html>
<body>
<p>Click aquí para escuchar Radio Lineage.</p>
<button onclick="myFunction()">Try it</button>
<script>
function myFunction()
{
window.open("http://localhost:8000/player/index.html");
}
</script>
</body>
</html>
Here is the code for the new tab:
<!DOCTYPE html>
<html>
<body>
.
.
<script type="text/javascript" src="http://hosted.musesradioplayer.com/mrp.js"></script>
<script type="text/javascript">
MRP.insert({
'url':'localhost:8000/stream',
'lang':'es',
'codec':'mp3',
'volume':65,
'autoplay':true,
'buffering':5,
'title':'Radio LineageChile',
'welcome':'Bienvenido a...',
'bgcolor':'#FFFFFF',
'skin':'radiovoz',
'width':220,
'height':69
});
</script>
.
.
</body>
</html>