Results 1 to 8 of 8

Thread: ToolTip - Multiple Actions?

  1. #1
    Join Date
    May 2008
    Posts
    4
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Red face ToolTip - Multiple Actions?

    1) Script Title: ToolTip - Multiple Action?

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...mltooltip2.htm

    3) Describe problem: I wanted to install 'Cool DHTML Tooltip II' on a 'Rollover Image'. Normally when the mouse is moved over a 'Rollover Image', the 'onMouseOver' action repaces the image with the 'Rollover OVER image'

    Now after installing'Cool DHTML Tooltip II' script, when the mouse is moved over the 'Rollover Image', it displays the tooltip text but does not change the 'Rollover OVER image' image.

    Is there any way to have two ACTIONS in 'onMouseOver', one to display the tooltip and another to change the UP image to the OVER image?

    I am pretty green, so it will be nice if you can give an example code.:

  2. #2
    Join Date
    Mar 2007
    Location
    Tarboro, NC
    Posts
    290
    Thanks
    8
    Thanked 2 Times in 2 Posts

    Default

    Can you please post the code you are using?
    Wow, I was just reading past posts and man I was a butthole sometimes to people. So if you ever got the end of it, then sorry...

  3. #3
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Code:
    <img src="some.gif" onmouseover="whatever();ddrivetip('Visit Yahoo.com');"
     onmouseout="whatever();hideddrivetip();">
    Just replace whatever() with your rollover code's functions exactly as they would have appeared if they were the only events.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  4. The Following User Says Thank You to jscheuer1 For This Useful Post:

    wildpeacockstudios (05-09-2008)

  5. #4
    Join Date
    May 2008
    Posts
    4
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    Thanks. It worked! Thanks.

  6. #5
    Join Date
    May 2008
    Posts
    4
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by jscheuer1 View Post
    Code:
    <img src="some.gif" onmouseover="whatever();ddrivetip('Visit Yahoo.com');"
     onmouseout="whatever();hideddrivetip();">
    Just replace whatever() with your rollover code's functions exactly as they would have appeared if they were the only events.
    Every thing works except the tool tip does not show arrow. I have followed the instructions and copied the 'arrow2.gif' image in the site folder in the 'image' folder. Any suggestions?

  7. #6
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    I just guessing that you might need to (red):

    Code:
    <script type="text/javascript">
    
    /***********************************************
    * Cool DHTML tooltip script II-  Dynamic Drive DHTML code library (www.dynamicdrive.com)
    * This notice MUST stay intact for legal use
    * Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
    ***********************************************/
    
    var offsetfromcursorX=12 //Customize x offset of tooltip
    var offsetfromcursorY=10 //Customize y offset of tooltip
    
    var offsetdivfrompointerX=10 //Customize x offset of tooltip DIV relative to pointer image
    var offsetdivfrompointerY=14 //Customize y offset of tooltip DIV relative to pointer image. Tip: Set it to (height_of_pointer_image-1).
    
    document.write('<div id="dhtmltooltip"></div>') //write out tooltip DIV
    document.write('<img id="dhtmlpointer" src="images/arrow2.gif">') //write out pointer image
    
    var ie=do . . .
    where images/ is the path to the arrow2.gif. If you need more help:

    Please post a link to the page on your site that contains the problematic code so we can check it out.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  8. #7
    Join Date
    May 2008
    Posts
    4
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Red face

    John:

    It worked. For those reading this post, following is the information how it worked:

    (1) I did a copy & past. The following line mad 'images' missing:

    Copy & Paste:

    document.write('<img id="dhtmlpointer" src="arrow2.gif">') //write out pointer image

    John's suggestion:

    document.write('<img id="dhtmlpointer" src="images[/COLOR]/arrow2.gif">') //write out pointer image

    I believe, this may not be the proble. Next item may be the real problem.

    (2) I had added this script into the a 'template' file. When I displayed the 'template' page, the 'arrow' in the tool tip did not display. But when I displayed a page (created from the 'template'), the tool tip displayed.

    In any case it works & my mucho thanks to John.

    Kirti

  9. #8
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Code:
    images/arrow2.gif
    is a relative path, it must be valid relative to whatever page it appears on. It doesn't matter how it gets on that page (include, written by a script, both, or hard coded).

    If the images folder is off of the root of the domain, it may be expressed as a network path:

    Code:
    /images/arrow2.gif
    Then it will be valid anywhere on that domain.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •