![]() Topic awaiting preservation: Tooltips again (Page 1 of 1) |
|
|---|---|
|
Nervous Wreck (II) Inmate From: |
posted 07-20-2004 00:18
Is it possible to modify a script like the one below (giving author credit of course) |
|
Nervous Wreck (II) Inmate From: London |
posted 07-20-2004 16:51
When you say "multiple times", do you you mean you want more than 1 physical box appearing, or do you just want the text appearing multiple times within the same physical box? |
|
Paranoid (IV) Mad Scientist with Finglongers From: Germany |
posted 07-20-2004 16:52
well... multiple tool tips at the same time, or different tooltips over different regions? Both should be possible - and you might even just have different divs within the tooltip, hidding & displaying them as neccessary.... |
|
Nervous Wreck (II) Inmate From: |
posted 07-21-2004 00:03
I would like different tooltips to appear over different regions of an image when rolled-over (a screenshot). |
|
Nervous Wreck (II) Inmate From: London |
posted 07-21-2004 00:39
Why not have many different DIVs over the top of the image, and have a different tooltip attached to each DIV? That way, you don't need to modify his code at all |
|
Nervous Wreck (II) Inmate From: |
posted 07-21-2004 01:40
Prob is I don't know how to modify the code. Right now the code is specific to the one div. |
|
Paranoid (IV) Inmate From: Sthlm, Sweden |
posted 07-21-2004 09:31
I did this for a help page once, don't have access to the code, but basically I created an imagemap on top of the image, then onclick I triggered the visibility of a div holding the appropriate text by it's id. |
|
Nervous Wreck (II) Inmate From: London |
posted 07-21-2004 11:06
quote:
|
|
Nervous Wreck (II) Inmate From: |
posted 07-22-2004 00:47
If you look at the code you will see it is hardcoded: code: var tipobj=document.all? document.all["dhtmltooltip"] : document.getElementById?
|
|
Maniac (V) Mad Scientist From: 100101010011 <-- right about here |
posted 07-22-2004 01:13
Um if you just read the instructions, for every mouseover you can specify different text, background color and width. Considering that You can use just one div and it will look different for every tip. |
|
Nervous Wreck (II) Inmate From: |
posted 07-22-2004 02:42
quote:
|
|
Maniac (V) Mad Scientist From: 100101010011 <-- right about here |
posted 07-22-2004 02:49
I was talking about the first. Look at how you define the mouseover's code: <a href="http://www.yahoo.com" onMouseover="ddrivetip('Visit Yahoo.com')";
|
|
Bipolar (III) Inmate From: |
posted 07-22-2004 03:59
I guess made this pretty confusing. Let me explain what i'm trying to do. |
|
Bipolar (III) Inmate From: |
posted 07-22-2004 04:42
Here's an idea of what i'm trying to accomplish: |
|
Maniac (V) Mad Scientist From: 100101010011 <-- right about here |
posted 07-22-2004 06:50
***bangs head on wall*** |
|
Nervous Wreck (II) Inmate From: London |
posted 07-22-2004 12:20
That's exactly what I've been trying to explain - glad you went the extra mile and showed how it could be done |
|
Nervous Wreck (II) Inmate From: California |
posted 07-22-2004 18:53
Walter Zorn has a great set of js code snippets, include a very feature rich example of tooltips: |
|
Bipolar (III) Inmate From: |
posted 07-23-2004 00:44
BillyRayPreachersSon: |
|
Maniac (V) Mad Scientist From: 100101010011 <-- right about here |
posted 07-23-2004 02:23
The "dhtmltooltip" div is simply a container, for the purposes of this script you don't need to worry about it, all it needs it gets from the call to ddrivetip() code: <div id="div1" onMouseover="ddrivetip('This is Tooltip 1!', '#EFEFEF')" onMouseout="hideddrivetip()">Tooltip 1</div>
|
|
Bipolar (III) Inmate From: |
posted 07-23-2004 23:52
Yeah, I figured dhtmltooltip was the container for the other divs...but how does the browser know that? code: document.getElementById("dhtmltooltip")
|
|
Bipolar (III) Inmate From: |
posted 07-24-2004 00:21
To enhance the effect I removed the 4 borders to each DIV and replaced them with an image: code: <DIV id=div2 onmouseover="ddrivetip('This is Tooltip 2!', '#EFEFEF')"
|
|
Maniac (V) Mad Scientist From: 100101010011 <-- right about here |
posted 07-28-2004 00:22
The width of the tooltip div is set to 150px, text should wrap at that point. To force it you can stick HTML break or paragraph tags in the text. |