Open external website onload?
I would like to open/link an external webpage onload in a new tab...
I am using this:
This works, but re-directs the page rather than open a new tab.
What would I include so that it does this in a new tab?
You should use window.open() for this. See http://www.w3schools.com/jsref/met_win_open.asp. The code would be something like:
However, as you can see, this code creates a new pop-up window and will be blocked by many browser pop-up blockers. You can't force a new tab. It's a user-settable option that determines if a new window is created or the page is loaded in a new browser tab.
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)