i have a script which uses window.open to open multiple popups in browser. But when i run that script on android browser or any mobile browser it dont work. Is there a way to open multiple tabs in mobile browser on load.

Recommended Answers

All 3 Replies

You can use an <a href="myPage.html" target="_blank">Open It</a>.

And use JavaScript to click it if nedeed.

No i dont need click i want to run it onload, click works but onload dont. I am asking for mobile browser like default android browser or safari browser for iphone. My script works on desktop but not mobiles

That's the catch... you create the link, hide it, and use JavaScript to click it.

Like this:

window.onload = function() {
    document.getElementById("myLink").click();
};

// Or with jQuery

$(function() {
    $("#myLink").click();
});
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.