phppup Posted January 22, 2019 Share Posted January 22, 2019 From an open browser window, I am using code to open 2 new tabs window.open("http://www.yahoo.com"); window.open("http://www.google.com"); They open sequentially, leaving browser tab that has GOOGLE open, active, and visible. Can I use JavaScript to indicate that I want the ORIGINAL tab to STILL be the ACTIVE window of focus? Quote Link to comment Share on other sites More sharing options...
requinix Posted January 23, 2019 Share Posted January 23, 2019 Best I can tell, there may be a couple options that work for now, but the truth is that this sort of thing is supposed to be up to the user's preferences and not controllable by the website because it's too prone to abuse. Any particular reason you need it opened in the background? Quote Link to comment Share on other sites More sharing options...
phppup Posted January 23, 2019 Author Share Posted January 23, 2019 Toying with different ideas. For easiest explanation, I'll explain it this way: Let's say I have a HOMEPAGE with a button for color-swatches. On-click, the button opens 4 new tabs that simply show the HTML color code with the entire page being that color (except for the font, obviously). Each of the 4 would be different shades of red for the viewer to choose which is prettiest. There is a risk of the objectivity being tainted if a viewer feels that the last page to open (in plain sight) is the "correct" choice. So, keeping the HOMEPAGE 'on top' would eliminate that prospect. Additionally, the HOMEPAGE might also have another button for shades of blue. Or even form fields to be filled out, so having it ready and primed would be more advantageous. Either way, it was just an aspect of exploration. Quote Link to comment Share on other sites More sharing options...
requinix Posted January 24, 2019 Share Posted January 24, 2019 Do they really need a whole tab for it? Could you do it with four iframes arranged 2x2 on a page? Hell, if you're just looking at colors/small content, you could do it with just four DIVs. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.