Re: img onClick problem
- From: "Jason Chan" <no@xxxxxxxxx>
- Date: Sun, 20 Nov 2005 01:51:36 +0800
OK, but how do I know all images are loaded, from the script
"Mr Newbie" <here@xxxxxxx> ¼¶¼g©ó¶l¥ó·s»D:uK2rYJS7FHA.3200@xxxxxxxxxxxxxxxxxxxxxxx
why dont you direct the onlick event to a function and have that function
exit unless all the images are loaded ?
--
Best Regards
The Inimitable Mr Newbie º¿?
"Jason Chan" <no@xxxxxxxxx> wrote in message
news:u$UQztR7FHA.1484@xxxxxxxxxxxxxxxxxxxxxxx
>I create a webpage contain a table of thumbnails (around 30).
> Since the thumbnails is generated on the fly, it take some time to load
> all
> of them, around 15s.
>
> On each image, I have a onClick listener to open the larger version of
> thumbnail in a popup window.
>
> If I click one of image when the page is still downloading the remaining,
> the popup open but the opener window stop download the remaining. Is it a
> normal behavior or I can do something to walk around it?
>
> Some of my code.
> <a href="javascript:openImage(1);">
> <img alt="" src="getResizedImageByID.aspx?id=1" />
> </a>
>
>
> function openImage(FileID)
> {
> var winl = (screen.width - 610) / 2;
> var wint = (screen.height - 610) / 2;
> winprops = 'height=' + 610 + ',width=' + 610 +
> ',top='+wint+',left='+winl+',scrollbars=no'
> win = window.open("","Preview", winprops)
> win.document.bgColor="#666666";
> docBody = win.document.body;
> docBody.style.margin = "5px 5px 5px 5px";
> docBody.innerHTML = "<img src='getResizedImageById.aspx?id=" +
> FileID + "&w=600' />";
> win.focus();
> }
>
> P.S Brower IE 6
>
>
.
- Follow-Ups:
- Re: img onClick problem
- From: Mr Newbie
- Re: img onClick problem
- References:
- img onClick problem
- From: Jason Chan
- Re: img onClick problem
- From: Mr Newbie
- img onClick problem
- Prev by Date: register dynamic javacript with RegisterStartupScript
- Next by Date: Re: img onClick problem
- Previous by thread: Re: img onClick problem
- Next by thread: Re: img onClick problem
- Index(es):
Relevant Pages
|