Welcome Guest, Not a member yet? Register   Sign In
trying to open a new tab in the browser
#4

I was wrong regarding that you should use a function to execute this line

window.open('https://duckduckgo.com/?t=ffab', '_blank');


i tried it directly in the controller and it worked


<?php namespace App\Controllers;

use CodeIgniter\Controller;

class Controller1 extends Controller
{
    public function index()
    {
        echo "
            <script>
                window.open('https://duckduckgo.com/?t=ffab', '_blank');
            </script>
            ";
    }   

}


but firefox told me that its preventing popups , so i enabled them for localhost , maybe you are disabling them.
Increase Your Awareness
Reply


Messages In This Thread
RE: trying to open a new tab in the browser - by BlackBanana - 07-18-2020, 03:01 PM



Theme © iAndrew 2016 - Forum software by © MyBB