[thelist] dreamweaver pop up window code
Mark Groen
mark at markgroen.com
Fri May 2 14:59:59 2003
Subject: [thelist] dreamweaver pop up window code
> I have used the dreamweaver 4 javascript code to make some small
> thumbnails open in a new window. They work fine apart from this:
> http://www.frostyandbird.com/photo.html
> I do not know javascript so please explain simply.
Simply, Dreamweaver doesn't make the best way to do pop-up windows. If
the site visitor has javascript turned off they won't work either.
Use this instead in your <head> section:
<script language="JavaScript" type="text/javascript">
<!-- hide from older browsers
function openWin(vUrl,vTarget)
{
n =
open(vUrl,vTarget,'toolbar=0,location=0,status=0,menubar=0,scrollbars=no
,resizable=0,top=20,left=70,width=600,height=400');
}
// -->
</script>
Then change your links to this syntax:
<a href="photopages_dec2002/mikepool1.html" onclick="openWin(this.href,
this.target); return false;" target="_blank"><img
src="yourimagefile"></a>
<a href="javascript:;" other stuff> See the difference? Now the link is
a real link and not dependent on javascript and it's used just for the
fancy window. Those without javascript get a page just like always.
More information about the thelist
mailing list