|
Posted by Andy Dingley on 10/16/06 11:17
mbstevens wrote:
> <a href="images/11.jpg"
> onclick="window.open('images/11.jpg','flower_window','width=500,
> height=406'); return false;">
> <img src="images/1.jpg" width="50"
> height="41" alt="flower" />
> <p>(Image will open in a new window.)</p></a>
>
> ...but never, ever do it, or anything even
> vaguely like it.
Nothing wrong with most of that - you use href appropriately as a
fallback if the JavaScript event handler isn't available. It does the
right things with return values etc.
I would suggest though using <br> instead of <p> to keep the HTML
valid.
I'd also give a useful title as the caption beneath the image, not an
instruction to go clicking on things. If you need this, do it once per
page.
If the popup window is to have a size, then try to set this dynamically
based on the actual size of the image. You can do this either server or
client side.
I'd also use the target="imagepopup" attribute on the <a> so as to open
them in a new window (I know opinions vary on this, but IMHO it's a
good use of it).
Navigation:
[Reply to this message]
|