You are here: Re: Picture Poup « HTML « IT news, forums, messages
Re: Picture Poup

Posted by mbstevens on 10/16/06 12:56

Andy Dingley wrote:
> 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 did in my page about the thumbnailing that
I copied it from:
http://www.mbstevens.com/howtothumb

I saw the <br> on my page and thought, a <p>
would work better. I didn't remember my own
research!
>
> 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.

That's not so much an instruction as a
warning that the thing will open a new
window. Visitors should be warned, at the
very least, if you are about to do something
so rude as opening a new window. Of course,
you shouldn't do it at all!

>
> 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.

Finding the size of images on the fly might
eat time. I think that this size should be
known in advance, either stored by the server
side program in a base or passed to the
server side program by the call from HTML.
For client side, you should just know the
size of the image in advance and code it in.
If it's on your site you can find it out in
advance easily.

>
> 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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация