ToolTip package (Walter Zorn's) performance issue

F

fochie

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_BORDERCOLOR='#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
 
R

RobG

fochie said:
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.
 
F

fochie

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,021
Latest member
AkilahJaim

Latest Threads

Top