[Javascript] Alternative ways to "popup" images?
forwebonly at web.de
forwebonly at web.de
Fri May 14 07:26:35 CDT 2010
-----Ursprüngliche Nachricht-----
Von: Paul Novitski <paul at juniperwebcraft.com>
>I think your perception of what is happening might be incorrect. I
>think the child window is not being closed and re-opened, it's being
>resized -- twice, first to 100x100 and then, after the new image
>loads, to the size of the new image + 200px.
This is, how i understood the code.
But if you look at the webpage itself, it is clear, that this is not what realy happens!
The images loads, the window gets resize and THEN, a *larger* window frame pops up for the fragment of a second.
This is the things that annoys me ....
>Check out Lightbox
><http://www.huddletogether.com/projects/lightbox2/> to see examples
>of how the aspect ratio of the pop-up can be animated for a smoother
>ride. In the case of Lightbox, the animation is handled using the
>jQuery library.
Thanx, i will have a look at that!
>Aside, your page is broken when JavaScript is turned off. I strongly
>recommend that you begin by marking up the page with real hyperlinks
>that link each image to its larger counterpart. Then use JavaScript
>to change the links so that they trigger the pop-ups. That way the
>content is accessible to every user agent -- including search
>engines, mobile devices, firewalled corporate users, and others that
>don't execute JavaScript -- but the page is still nicer viewed with
>scripting enabled. That is the "win-win" way of web development we
>call progressive enhancement.
Could you provide a short example of this?
I can only "modify" such code, not realy create it, sadly ...
What would be needed in those lines:
<td>9:<a href="javascript:;" onclick="enlarge(8,'400/2','760/2')"><img src="400/2/DSC_7398.jpg" alt="DSC_7398.jpg" border="no"></a></td>
Just using a HREF to the larger image?
<td>9:<a href="760/2/DSC_7398.jpg"><img src="400/2/DSC_7398.jpg" alt="DSC_7398.jpg" border="no"></a></td>
But then, how to change that with JavaScript?
Any hint would be appreciated :)
>Also, using a pop-up browser window to display the large image can be
>problematic, and I suggest you look at the way Lightbox accomplishes
>this by displaying the large image in a div *on the same page* and
>then styling it to overlay everything else through absolute positioning.
I especially like the popup-window - it also works fine with a second monitor, which i constantly use.
___________________________________________________________
GRATIS: Movie-Flat mit über 300 Top-Videos. Für WEB.DE Nutzer
dauerhaft kostenlos! Jetzt freischalten unter http://movieflat.web.de
More information about the Javascript
mailing list