Re: Pop-up window<Javascript?>
by "Bert" <bdoorn(at)iprimus.com.au>
|
Date: |
Tue, 26 Mar 2002 21:47:20 +0800 |
To: |
<hwg-basics(at)hwg.org> |
References: |
prodigy computer 0 |
|
todo: View
Thread,
Original
|
|
G'day
Fuzzy wrote:
> And how might I ask do the folks with no (or disabled) Javascript
> experience this?
They won't experience anything except a link that doesn't work. I know
there's people who turn javascript off because a few have annoyed them or
because they think it's gonna wipe their hard-drive. They'd rather make life
harder for the designer. But I digress....
IN this case, the shortcoming is very easy to overcome and I use the
technique below regularly. Amend the script slightly, by putting a "return
false" just before the end of the function:
function Genie(theURL)
{
var theWindow = window.open(theURL,"","width=300,height=200")
return false;
}
Then write the link like this (delete the dots after the < )
<.a href="thepageurl.html" target="_blank" onclick="return
Genie('thepageurl.html');">Click Here<./a>
Javascript disabled (for whatever reason)? You should get a default window.
Javascript enabled? You get the sized window.
HTH
--
Bert Doorn, Web Developer
CIW Associate, IWA Member
www.betterwebdesign.com.au
Fast Loading, User Friendly Websites
HTML: hwg-basics mailing list archives,
maintained by Webmasters @ IWA