[thelist] onClick="open problem

Liam Delahunty ldelahunty at britstream.com
Wed Feb 5 06:29:08 CST 2003


Hugh Blair wrote:

<snip>
(This *is* on one line. I've used "~" to show that the
line continues...)

<a href="html/images/1014.html" title="Larger image"  ~
target="view" onClick="open('html/images/1014.html',  ~
'view', 'width=420,top=50,left=50,scrollbars=yes,     ~
resizable=yes')"><img src="/1014.jpg" border="0"></a>

</end>

Should that be window.open. Why bother with th onclick anyway.?


I always call an included function as it's reused

<script language="JavaScript">
<!-- //
function wo(url, name, bits) {
newWin=window.open(url, name, bits);
newWin.focus();
}
// -->
</script>

and the link:
<a href="javascript:wo('new.html', ~
'windowname','height=100,width=100, ~
toolbar=yes,scrollbars=yes,resizable=yes, ~
status=yes,copyhistory=yes,location=yes, ~
menubar=yes')">Open window</a>

HTH

Kind regards, Liam Delahunty
Mega Products Limited, 10-11 Moor Street, Soho, London W1D 5NF
http://www.onlinesales.co.uk/ Open Source PHP/MySQL E-commerce
http://www.liamdelahunty.com/ web/ design/ database/ programming
http://www.britstream.com/ Hosting/ Domain Names From UKP 7.50 p.a.





More information about the thelist mailing list