[Javascript] Popup window: Feedback on simple script:

Michael Hulse micky at ambiguism.com
Wed Dec 14 14:46:52 CST 2005


Hey all,

This is my first post to list, so be gentle.  :D

I would love to hear your thoughts on the below code:

function popitup(url,ph,pw) {
	var newwindow = window.open(url,'photopopup','height=' + ph +  
',width=' + pw +  
',directories=no,location=no,menubar=no,scrollbars=no,status=no,toolbar= 
no,resizable=no,screenx=150,screeny=150');
	if(window.focus) { newwindow.focus() }
	return false;
}

<a
	href="/path/to/popup.php?z=/path/to/image_two.jpg&amp;width=500&amp; 
height=375&amp;title=Pic%202"  
onclick="popitup('/path/to/popup.php?z=/path/to/image_two.jpg&amp; 
width=500&amp;height=375&amp;title=Pic%202','375','500'); return false"  
	onMouseOver="document.window.status='photo popup: Pic 2'; return true"
	 onMouseOut="document.window.status=''; return true">
	<img src="/path/to/thumb/image_two.jpg" width="150" height="113"  
alt="Pic 2">
</a>

Anything I can do to make it better?

Your feedback would be greatly appreciated.  :D

Thanks
Cheers,
Micky
-- 
¸.·´¯`·.¸¸><(((º>`·.¸¸.·´¯`·.¸¸><((((º>
·´¯`·.¸¸.·´¯`·.¸¸.·´¯`·.¸¸.·´¯`·.¸¸><((((º>
`·.¸¸><((((º>¸.·´¯`·.¸¸><((((º>



More information about the Javascript mailing list