To Kevin: Problem with tooltips

Please note that official support for this menu version has now ceased. There are still plenty of users, though, and the forum is still running. Some of our long-time users may be able to help you out.
Post Reply
User avatar
Martin
Mega User
Mega User
Posts: 113
Joined: Fri Jul 05, 2002 11:57 pm
Location: Zollikon, Switzerland

To Kevin: Problem with tooltips

Post by Martin »

Hi Kevin,

I used 'popup textboxes' as described in the examples.
I have four anchor tags, every with a tooltip. Sometimes, the tooltip will not disapear, even if the mouse pointer ist somewhere else. If a tooltip overlaps an other one (tooltip1 waits to get closed and tooltip2 is already visible) a funny behaviour happens.

Checkout the printscreen.

Image
User avatar
kevin3442
Milonic God
Milonic God
Posts: 2460
Joined: Sat Sep 07, 2002 12:09 am
Location: Lincoln, NE
Contact:

Post by kevin3442 »

Hi Martin,

Sorry it's taken me so long to get back to you. My work sometimes takes me into places or situations where I don't have much contact with the rest of the world! That's been the case for the past few weeks.

I hadn't forseen the situation you have here (clearly!). If you're still using those popup functions, let me know and I'll have a go at a solution for you. Probably won't be able to get to it until early next week however.

Kevin
User avatar
Martin
Mega User
Mega User
Posts: 113
Joined: Fri Jul 05, 2002 11:57 pm
Location: Zollikon, Switzerland

ToolTips

Post by Martin »

Hi Kevin,

Yes, i would to use your popups in several projects. It's a cool function. At the moment, we're using a different code for the popups, but we like to use your code to get rid of third party code. To see the old tooltips, please visit the site http://www.brainware.ch

If you have updated code, please keep me posted.

Thanks,

Martin
User avatar
Martin
Mega User
Mega User
Posts: 113
Joined: Fri Jul 05, 2002 11:57 pm
Location: Zollikon, Switzerland

Post by Martin »

Hey Kevin, still somewhere in a dark office?

Do you have any idea, if your code will be fixed?

Thanks
User avatar
kevin3442
Milonic God
Milonic God
Posts: 2460
Joined: Sat Sep 07, 2002 12:09 am
Location: Lincoln, NE
Contact:

Post by kevin3442 »

Hi Martin,

I'm really sorry man. I completely forgot about this until I got the notification in my inbox of your post to this thread. :oops: Work's been pretty busy lately, so I haven't been participating very much in these forums recently and your issue just sort of slipped my feeble mind. Again... sorry.

OK, enough with excuses. I've pretty much got it licked. Rather than trying to tweak the existing code to get past your problem, I wrote a couple of new functions specifically for textboxes. I have a little fine tuning to do, and the documentation to add. Should be ready tomorrow evening. I'll post again in this thread when it's ready.

A qestion for you: Do you use any of the other menu positioning functions for actual menus, or are you only interested in the popup textboxes? I could break out the textbox stuff into a separate file, to cut down on the overhead.

Kevin
User avatar
Martin
Mega User
Mega User
Posts: 113
Joined: Fri Jul 05, 2002 11:57 pm
Location: Zollikon, Switzerland

Post by Martin »

Hi Kevin,

In two projects, we only use the popup menus. If you can break out the textbox code into a separate files, do it! That might decrease the download time a bit. Sounds good!

cheers

Martin
User avatar
kevin3442
Milonic God
Milonic God
Posts: 2460
Joined: Sat Sep 07, 2002 12:09 am
Location: Lincoln, NE
Contact:

Post by kevin3442 »

Hi Martin,

You can download an updated kc_positionedMenus.zip.

The zip contains a new file called kc_textBox.js, which contains the textbox functions: kc_openTextBox() and kc_closeTextBox(). This file requires that kc_commonFunctions.js also be loaded. The index.html file that comes with the zip documents the use of these new functions and shows a couple of examples.

The textboxes are meant to act like standard tooltips, appearing on mouseover and disappearing on mouseout. You can specify an optional delay between mouseover and the appearance of the textbox, so that the textbox won't pop up immediately (like a tooltip). If you close the box with a mouseout event, as intended, then there should be no possiility that two textboxes will overlap, since only one should be visible at any given time.

Hope that works for you. Let me know how it turns out.

Kevin
User avatar
Martin
Mega User
Mega User
Posts: 113
Joined: Fri Jul 05, 2002 11:57 pm
Location: Zollikon, Switzerland

Post by Martin »

Hi Kevin,

Thanks a lot, you saved my day. I will test the code saturday.

cheers

Martin
User avatar
kevin3442
Milonic God
Milonic God
Posts: 2460
Joined: Sat Sep 07, 2002 12:09 am
Location: Lincoln, NE
Contact:

Post by kevin3442 »

Hi Martin,

I was playing around some more (it's Friday after all) and thought it would be fun to try my hand at some anticollision code, to prevent a menu (or textbox) from opening where part of it gets clipped by a window edge. So far I've had success bumping a menu to the left to prevent the right side from getting clipped, or up to prevent the bottom from getting clipped. I started with those since most tooltips open below and to the right of the cursor. It's working pretty well so far, so if clipping is an issue for you, let me know.

Well, the beer's almost gone and I don't have any bugs, so I'm headed home. Have a good weekend.

Kevin
User avatar
Martin
Mega User
Mega User
Posts: 113
Joined: Fri Jul 05, 2002 11:57 pm
Location: Zollikon, Switzerland

Post by Martin »

Hi Kevin,

My tooltips are working very well. You're code runs smoothly.
I will update the page into production in the evening (CET), checkout http://www.brainware.ch
User avatar
kevin3442
Milonic God
Milonic God
Posts: 2460
Joined: Sat Sep 07, 2002 12:09 am
Location: Lincoln, NE
Contact:

Post by kevin3442 »

Hi Martin,

Glad it works. Two things:

(1) I noticed that your tooltips have what appear to be links in them. Since the tootips now close onmouseout, the user won't be able to get to a link in the tooltip. Is that a problem?

(2) Have you tried opening the tooltips using the delay option?

Nice looking page design.

Kevin
User avatar
Martin
Mega User
Mega User
Posts: 113
Joined: Fri Jul 05, 2002 11:57 pm
Location: Zollikon, Switzerland

Post by Martin »

Hi Kevin,

I did not update the site yet. The tooltips on the production server is made with some older code.

Actually, I'm bulding an "send to friend"-Feature with you code. It' looks pretty cool.

I will do the update today in the evening (hopefully...)

To your questions:

1: No 2: Yes

Thanks!
User avatar
Martin
Mega User
Mega User
Posts: 113
Joined: Fri Jul 05, 2002 11:57 pm
Location: Zollikon, Switzerland

Post by Martin »

Hi Kevin,

I build a nice "Send to" Box with your code. Check this out:

http://www.brainware.ch/index.cfm?227D6 ... F03BE733F2

I used kc_openAboveThisObject and it works fine. Now we like to place the box with fixed coordinates instead of above the link.
I can't use the function kc_openAtPosition, the behaviour is not the same.

Any idea?
User avatar
Martin
Mega User
Mega User
Posts: 113
Joined: Fri Jul 05, 2002 11:57 pm
Location: Zollikon, Switzerland

Post by Martin »

ooops, forgot something: Click on "send page" to see the popup
User avatar
kevin3442
Milonic God
Milonic God
Posts: 2460
Joined: Sat Sep 07, 2002 12:09 am
Location: Lincoln, NE
Contact:

Post by kevin3442 »

Hi Martin,

I'm not 100% sure how you're calling kc_openAtPosition(), but given your use of kc_openAboveThisObject() on the test page, I'm guessing that you pass a 0 in the optional fourth parameter (the timeout), to keep the box open until manually closed. You're probably seeing that the box closes when you mouse out, instead of waiting for user input. Is that it?

I believe I know what caused this and how to fix it. Simply put, the cause was me... I screwed up a line in kc_openAtPosition(). Fortunately, the fix is me-based as well ;) ... here it is:

Change line 103 of kc_positionedMenus.js from:

Code: Select all

kc_showMenu(menuName);
To:

Code: Select all

kc_showMenu(menuName, 1);
I can't believe my code editor didn't know that I meant to put that 1 in there! Seems like it's always leaving important stuff out, misspelling things, etc.

BTW, if you want to position the box absolutely because you want to avoid the possibility of it get clipped by the right edge of the browser window, you could check out the new version with built-in collision avoidance; it would automatically bump the box over to avoid getting clipped. I haven't uploaded this version, but if you're interested in trying it, I can get it to you.

Hope that helps... let me know.

Kevin
User avatar
Martin
Mega User
Mega User
Posts: 113
Joined: Fri Jul 05, 2002 11:57 pm
Location: Zollikon, Switzerland

Post by Martin »

Hi Kevin,

Please send me the new version, I will try it!
User avatar
Martin
Mega User
Mega User
Posts: 113
Joined: Fri Jul 05, 2002 11:57 pm
Location: Zollikon, Switzerland

Post by Martin »

Hi Kevin,

I changed the file like you told me. It works fine now.

cheers

Martin
User avatar
kevin3442
Milonic God
Milonic God
Posts: 2460
Joined: Sat Sep 07, 2002 12:09 am
Location: Lincoln, NE
Contact:

Post by kevin3442 »

Hi Martin,

Glad it worked. Sorry I haven't sent you the latest. I found a couple minor issues (in the anti-collision code, but haven't gotten around to fixing them yet. They should not affect you implementation. I'll keep you posted.

Kevin
Post Reply