/    Sign up×
Community /Pin to ProfileBookmark

Loading Images as Hidden

I have a wzTooltip setup for onmouseover of a description which shows the image, problem is when the image first appears hover x1 the image doesn’t load completely, you have to place the cursor over it again to get the image to show completely (shows the left side on first). This information is all from the DB, was wondering if I created a .NET repeater which would print out just the images e.g.
<img src=”../Imagesrc…” style=”display:none;” />
<img src=”../Imagesrc…” style=”display:none;” />

but not display them on screen would the web browser load these then when I use the hover over would they already be there??

to post a comment
HTML

6 Comments(s)

Copy linkTweet thisAlerts:
@LeeUMay 08.2008 — Do you want this thread moved to the .Net forum?
Copy linkTweet thisAlerts:
@gil_davisMay 08.2008 — The usual technique for images that are used for mouseover effects is loosely termed "preload". It involves javascript that causes the browser to cache the images that are not directly mentioned in the HTML.
<i>
</i>var ary = new Array();
ary[0] = new Image();
ary[0].src = "../Imagesrc...";
ary[1] = new Image();
ary[1].src = "../Imagesrc...";
...
Copy linkTweet thisAlerts:
@Nate1authorMay 08.2008 — No please leave here, not really .NET orientated. Just the way the images get on the page, need to know how the web browser will load them.
Copy linkTweet thisAlerts:
@gil_davisMay 09.2008 — need to know how the web browser will load them.[/QUOTE]It will start loading them one at a time, in the sequence that they appear in the HTML.
Copy linkTweet thisAlerts:
@Nate1authorMay 13.2008 — So display:none, is client side, and does not effect whether they are loaded or not?
Copy linkTweet thisAlerts:
@gil_davisMay 13.2008 — So display:none, is client side, and does not effect whether they are loaded or not?[/QUOTE]Yes
×

Success!

Help @Nate1 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.16,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...