August 28th, 2001, 09:34 PM
but now decided to try here.
I want to pop a "help" window in a "new" location so the user
is aware that there are now 2 windows -- the help window
and the "main" window that the help refers to.
If it's hard, it's probably wrong.
August 28th, 2001, 09:55 PM
Because it won't work ;-)
Sorry couldn't resist, I'm not sure that there is any way to detect it because a users browser settings I would think are a private thing and were not designed for us to explore.
I could be wrong though.
-- SilkySmooth --
August 28th, 2001, 11:09 PM
First off, you do realize that there is an html href tag property called 'target' that allows you to open links in a new window, right? You have no say over the size of the window, but if it absolutely must be in a new window even if JS is off, use 'target=_blank'.
Having said that, Here is how I make my links using the open function so that I know it will still work with non-JS enabled browsers
Now, let me explain what that is doing.
<a href="http://www.clanmisfire.com" target="_blank"
"height=750,width=590,resizable=yes,scrollbars=yes"); return false;'>
If a browser has JS ENABLED, it first executes the onClick event handler. The function window.open runs, opening a new window. Then the next line, return false;, executes. This keeps the browser from going any farther for this href tag. In other words, it does NOT act like a link and follow the href property.
If a browser has JS DISABLED, it ignores the onClick property and goes straight for the href. It opens the link in a new window anyway. The only thing is that you have no say over what that new window looks like. I think for the small percentage of ppl that have JS turned off, this is acceptable considering they can still get to the content.