[thelist] How to do this? Mov links

Benjer futureweb at macmail.com
Tue Jan 7 10:44:10 CST 2003


> The link itself is just normal, so you can right click and download it.
>
> However if you click on it with the left mouse button then it opens in it's
> own little popup window.

View source shows:

<a href="gallery/CCAC_S021/QTs/S021_adam_anim.mov"
onClick="OpenWindow('gallery/CCAC_S021/QTs/S021_adam_anim.html',320,270,'scr
ollbars=no,menubar=no,toolbar=no,location=no,status=no,resizable=no','moview
indow'); return false;">picture to click</a>

Javascript in top of head:

function OpenWindow(url,width,height,options,name ){if(! width )
width=640;if(! height ) height=420;if(! options )
options="scrollbars=yes,menubar=yes,toolbar=yes,location=yes,status=yes,resi
zable=yes";if(! name ) name="outsideSiteWindow";var
newWin=window.open(url,name,"width="+width+",height="+height+","+options );}


So there is the answer. left click invokes the javascript 'OpenWindow' and
return false makes it a normal link with right click - as if javascript was
disabled.

Hope that helps...

benjer





More information about the thelist mailing list