Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6113463
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T14:51:43+00:00 2026-05-23T14:51:43+00:00

As the title says. I want to create TooltipDialog, after I click link and

  • 0

As the title says. I want to create TooltipDialog, after I click link and load custom content into that dialog. The tooltip body is complete placeholder, I just haven’t done any server logic to handle this.
So far i got to this point:

            PreviewThread: function (ThreadID) {

            var tooltip = new dijit.TooltipDialog({
                href: "/Account/SingIn?ReturnUrl=" + Jaxi.CurrentLocation
            });
        },

<a href="javascript:Jaxi.PreviewThread(@thread.ThreadID)" class="preview-thread" id="@tp.ToString()">Preview</a>

The point is not even how to load content, into dialog, but how to open it in the first place ?

After more googling and trial & error I finally got to this:

            PreviewThread: function (ThreadID) {

            var tooltip = new dijit.TooltipDialog({
                href: "/Account/SingIn?ReturnUrl=" + Jaxi.CurrentLocation,
                closable: true
            });
            dojo.query(".thread-preview").connect("onclick", function () {
                dijit.popup.open({ popup: tooltip, around: this });
            });            
        },

It’s somehow working. ToolTipDialog opens, but.. I have to click twice and and I can’t close dialog after click outside it, or after mouseleave.

Ok this, going to start look like dev log, but hopefully it will save others some headchace:

I finally managed to popup it where I want to:

            PreviewThread: function (ThreadID) {

            var tooltip = new dijit.TooltipDialog({
                href: "/Account/SingIn?ReturnUrl=" + Jaxi.CurrentLocation,
                closable: true
            });

            dijit.popup.open({ popup: tooltip, around: dojo.byId("thread-preview-" + ThreadID) });
        },
<a href="javascript:Jaxi.PreviewThread(@thread.ThreadID)" id="@tp.ToString()" >Click Me</a>

Note that I’m using Asp .NET MVC.
Now only thing left is to close damn thing in user friendly manner..

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T14:51:43+00:00Added an answer on May 23, 2026 at 2:51 pm

    There are afaik two ways you can do this, and neither one is very elegant tbh 😛

    The first is to use dijit.popup.open() and close() to show and hide the dialog. In this case, you have to provide the desired coordinates. I see that you only provide your PreviewThread function with a thread id, but assuming you also tack on the event object, you can do:

    PreviewThread: function (ThreadID, event) {
    
        Jaxi.tooltip = new dijit.TooltipDialog({
            href: "/Account/SingIn?ReturnUrl=" + Jaxi.CurrentLocation
        });
        dijit.popup.open({
            popup: Jaxi.tooltip, 
            x: event.target.pageX, 
            y: event.target.pageY
        });  
    }
    

    When you’re using this method, you also have to manually close the popup, for example when something outside is clicked. This means you need a reference to your tooltip dijit somewhere, for example Jaxi.tooltip like I did above. (Side note: dijit.TooltipDialog is actually a singleton, so there won’t be lots of hidden tooltips around your page). I usually end up with something like this for hiding my tooltip dialogs.

    dojo.connect(dojo.body(), "click", function(event)
    {
         if(!dojo.hasClass(event.target, "dijitTooltipContents"))
             dijit.popup.close(Jaxi.tooltip);
    });
    

    This may of course not work for you, so you’ll have to figure out something that suits your particular arrangement.

    The second way is to use the dijit.form.DropDownButton, but styling it as if it was a link. I’m not going to go into details on this, just instantiate a DropDownButton on your page and use Firebug to tweak it until it looks like your regular links. FYC, link to DropDownButton reference guide.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Like the title says I am trying to create some regex that selects anything
The title basically says it all. I mainly want to do this so that
As the title says. How would I create an instance of a class that
Just as the title says, if I have a JFreeChart (or want to create
As the title says, I want to know, if possible, how can I create
I'm searching for a code example/link that does what the title says. Basically I
As title says. I want to perform and order by on a list -
I just want what my title says.I have already read all the previous similar
The title says it mostly. If I have an object in Python and want
Basically what the title says, I want to get the URL and HTTP Verb

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.