How to open a new tab in a popup?

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>
+4
3

URL- , :

var win = window.open("http://localhost:8000/player/index.html", 'newwin', 'height=200px,width=200px');

= 200px, width = 200px. URL- (win),

win.location = " http://www.google.com" /

URL google URL-, .

, ! .

0
<script type="text/javascript">
        win = null;
        function openPopup(){
            win = window.open("http://www.google.com", 'newwin', 'height=200px,width=200px');
        }
        function openOtherUrl(){
            win.location = 'http://www.yahoo.com';
        }
    </script>

, URl. , !

-1

, , . .

 <!DOCTYPE html>
 <html>
<body>

 <p>Click the button to open an about:blank page in a new browser window that is 1200px wide and 600px tall.</p>

 <button onclick="openWin()">Open Window</button>

 <script>
 function openWin()
{
 var myWindow = window.open("","","width=1200,height=600");
}
</script>

  </body>
  </html>
-1

All Articles