Results 1 to 7 of 7

Thread: tooltip upgrade

  1. #1
    Sencha Premium Member
    Join Date
    Nov 2007
    Location
    Moore, Oklahoma
    Posts
    505

    Question tooltip upgrade

    ok i have one last thing to put in before my upgrade to 2.0 is complete. and as i am doing this i see 2.1 is out. lol but let me get this done first. can someone tell me or explain to me what I need to change in the code below to work in 2.0

    Code:
      <script type="text/javascript">
              // Instantiate and render the menu bar and corresponding submenus
              if (window.location.href.toLowerCase().indexOf("https") == 0) {
              YAHOO.widget.Module.IMG_ROOT_SSL = "js/YUI/assets/container";
              }
              YAHOO.widget.Tooltip.CSS_TOOLTIP = "popuptext";
              new YAHOO.widget.Tooltip("tt1", { context:"operator", text:"text goes here",autodismissdelay:10000 });
              new YAHOO.widget.Tooltip("tt1", { context:"email", text:"text goes here.",autodismissdelay:10000 });
              new YAHOO.widget.Tooltip("tt1", { context:"email2", text:"text goes here",autodismissdelay:10000 });
              new YAHOO.widget.Tooltip("tt1", { context:"phone", text:"text goes here",autodismissdelay:10000 });
              new YAHOO.widget.Tooltip("tt1", { context:"inoffice", text:"text goes here",autodismissdelay:10000 });
            </script>
    thanks and I should be good to go after this.

    these forms are a blessing thanks for the help everyone!!

  2. #2
    Sencha User Animal's Avatar
    Join Date
    Mar 2007
    Location
    Bédoin/Nottingham
    Posts
    30,892

    Default

    Well, I just glanced at the API docs for ToolTip and it was very easy to figure out that it's:

    Code:
    <script type="text/javascript">
        // Instantiate and render the menu bar and corresponding submenus
        if (window.location.href.toLowerCase().indexOf("https") == 0) {
            YAHOO.widget.Module.IMG_ROOT_SSL = "js/YUI/assets/container";
        }
        Ext.ToolTip.CSS_TOOLTIP = "popuptext"; // <-- What's this?
        new Ext.ToolTip({ target:"operator", html:"text goes here", dismissDelay:10000 });
        new Ext.ToolTip({ target:"email", html:"text goes here.", dismissDelay:10000 });
        new Ext.ToolTip({ target:"email2", html:"text goes here", dismissDelay:10000 });
        new Ext.ToolTip({ target:"phone", html:"text goes here", dismissDelay:10000 });
        new Ext.ToolTip({ target:"inoffice", html:"text goes here", dismissDelay:10000 });
    </script>
    http://extjs.com/deploy/dev/docs/?class=Ext.ToolTip

  3. #3
    Sencha Premium Member
    Join Date
    Nov 2007
    Location
    Moore, Oklahoma
    Posts
    505

    Default

    your the man.. thanks I for some reason have problems in the Api. after this upgrade to 2.0 I am really going to get to know 2.0 better. and try and work with many examples in the API. thanks again for the help. I am one of those people that learn by looking at examples then I usually won't forget what i see.

    but thanks Animal your a life saver , I am sure you hear that all the time but one more wont hurt

    thanks for all the hard work guys!!

  4. #4
    Sencha Premium Member
    Join Date
    Nov 2007
    Location
    Moore, Oklahoma
    Posts
    505

    Default

    in response to your Ext.ToolTip.CSS_TOOLTIP = "popuptext"; // <-- What's this?

    this is for when you rollover the ? i have o n my page that controlls the style of the box and text that pops up

  5. #5
    Sencha User Animal's Avatar
    Join Date
    Mar 2007
    Location
    Bédoin/Nottingham
    Posts
    30,892

    Default

    You should take some time to browse the docs at leisure. It sounds geeky, but it is interesting and you can learn a lot. They have been added to a LOT for the 2.1 release.

    Also, if there are too many configs and it's confusing, click that "No Entry" button second from left at the top. It hides inherited members, so you just get to see what applies to that class.

    Do that on the Ext.ToolTip page, and it becomes a lot easier to see how to configure it.

  6. #6
    Sencha User Animal's Avatar
    Join Date
    Mar 2007
    Location
    Bédoin/Nottingham
    Posts
    30,892

    Default

    In Ext, Ext.ToolTips are Ext.Panels, so you'd style them in the same way that you'd style a Panel: Using the cls config to apply an overall class name to the Panel's element, or perhaps with bodyStyle to apply CSS styles directly to the Panel's body element.

  7. #7
    Sencha Premium Member
    Join Date
    Nov 2007
    Location
    Moore, Oklahoma
    Posts
    505

    Default

    ok thanks. your advice is helping me greatly. much appreciated.

Posting Permissions

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