in a script, i need for a new window to open, but i cant find anything on this in the documentation! like i know header(‘location:blah’) is a redirect, is there anyway to make a new window open?? stupid how JS could do it, but i dont like being JS dependant.
@Ben_RogersFeb 10.2004 — #But, really think about it. Since PHP runs before the page loads, someone could open a billion windows and screw the comp up so much if it had that power...
Also, there's always target="_blank"... and if you're looking for it open onload, please reconsider that's very annoying.
@Sux0rZh_jc0rzauthorFeb 12.2004 — #true that it would be annoying, but not where im using it. someone types into a chatbox "/help" and it opens the help page. thus they'd be expecting it. not exactly annoying then, eh? ?
sux about using JS.. i'll just have it display in the chatbox "If you do not have JavaScript enabled, the page can be found here: http://blah..". that should work to cover my arse. automatically opens if u have JS and if u dont, it gives you a link. good enough for me!
@Ben_RogersFeb 12.2004 — #what about target="_blank" ? That opens a link in a new window, and if it's a button you want you could always use CSS to make a link to look like a button.
@Sux0rZh_jc0rzauthorFeb 12.2004 — #making target="_blank" doesn work, because its a chatbox, and when they type /help then hit submit, the script is called at which point, if it reads that they typed in /help, it will open the page. so there is no button for them to click. =/
@Ben_RogersFeb 12.2004 — #right click, open in same window.
but what i like to do more is right click, open in new tab. there needs to be a target for that, then if the borswer isnt mozilla it just opens in the same window.
@Paul_JrFeb 12.2004 — #[i]Originally posted by samij586 [/i]
[B]Center Click -> new tab in background
EDIT: opens in foreground if you go into options -> advanced -> Browsing -> and uncheck Open Links in Background [/B][/QUOTE] Wow, sweet! I didn't know that. That's a handy tidbit of information right there, thanks! ?
@pyroFeb 12.2004 — #[i]Originally posted by samij586 [/i]
[B]firefox, if you push downwards on the mousewheel (as if it were a button) rather than scroll it, it opens links in a new tab.[/B][/QUOTE]And Firefox seems to have fixed the bugs the Firebird had with this. On some sites, that didn't work. They all seem to work fine now. Awesome feature, for sure.
@BonnerFeb 13.2004 — #Why dont you use PHP to call a JavaScript file that either opens a frame in the same window or asks for a users preferences upon execution?