By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,317 Members | 1,290 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,317 IT Pros & Developers. It's quick & easy.

ToolTip package (Walter Zorn's) performance issue

P: n/a
Greetings,

First time append.

I have a dynamic page that can potentially contain thousands of links.
Each link has an onmouseover specified with Walter Zorn's Tool Tip
feature to pop up a small image. This has been working fine but I
noticed that a page with many links loads very slowly. I then realized
that the images that are used for the onmouseover pop ups are all
automatically being downloaded when the page initially loads.

I wouldn't expect these images to be referenced by the browser until an
onmouseover event occurs, but that does not seem to be the case.

I thought I could get around this by changing the Tool Tips to call a
JS function (that would eventually invoke a server side PHP to serve up
the image), instead of specifying an <img> tag in the Tool Tip, but the
JS function also gets called immediately when the page loads as well
(for each Tool Tip specified on the page).

I boiled a test page down to a few lines that shows the JS function
being invoked as soon as the page loads (the function just displays an
alert when called).

When this page is hit, the JS function automatically gets called three
times (once for each Tool Tip link in the html) ...

http://timegonebuy.com/ToolTipProb.html

This is an example of the onmouseover's I'm trying to use -

onmouseover="this.T_WIDTH=60;this.T_SHADOWWIDTH=0; this.T_PADDING=3;this.T_BORDERWIDTH=1;this.T_BORDE RCOLOR='#000000';
this.T_BGCOLOR='#FFFAFA'; return escape(PopCPpic('image_1.jpg'))"

This support is invoked by including Walter's JS file and then coding a
"return escape" to invoke it.

Any insight anyone might have on why this is happening and/or any
suggestions on how I might get around the problem are most appreciated.
Thanks !!
Steve

Jul 23 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
fochie wrote:
Greetings, [...] Any insight anyone might have on why this is happening and/or any
suggestions on how I might get around the problem are most appreciated.


Check the 500 lines of your referenced script file:

<URL:"http://mygallery.timegonebuy.com/wz_tooltip.js">

your problem lies about line 240 where the script redefines the
onmouseover function. If all you are using this script for is to make
a small image appear as a tool tip, write your own function.

You should be able to do it in a few lines. Ditch the in-line styles
on each link and put it into a class - resulting in far less code to
download - but you will have a lag on your mouseover whilst the image
is retrieved.

--
Rob
Jul 23 '05 #2

P: n/a
Rob,

Thanks for your reply. I've taken your advice and bailed on using the
Walter Zorn ToolTip script since it appears to be somewhat intrusive.
I've found an example tooltip script from Dynamic Drive that I've been
able to easily modify/customize to fit my needs. Getting it to co-exist
with the Walter Zorn Drag/Drop script (which I am somewhat dependant on
at the moment) was a little challenging, but I seem to have both
scripts running fine now.

Thanks again,
Steve

Jul 23 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.