jncraig Posts:83

| | 07/02/2007 10:39 PM |
| I've added a custom module to a DNN 4.4.1 installation. The module is built including some text boxes and labels that have "tooltips" created by putting text into the "tooltip text" propery of those controls.
When I view the module in IE, the tooltips are just fine. When viewed in Firefox, multiline tooltips are displayed truncated to a single line.
Any ideas how to fix this? | | | |
|
|
|
John Mitchell Posts:3479


| | 07/02/2007 10:47 PM |
| I wouldn't trust a MS server control to render tooltips right for anything but IE. ;)
That being said, it should just be putting it into the "title" attribute of the specific element. Maybe you can do what you need by just specifiying the "title" attribute.
If not, then please post some details about the html being produced, or a link to the page and maybe I can figure it out. | | | |
|
jncraig Posts:83

| | 07/03/2007 10:59 AM |
| The tooltips are in the title ...
span id="dnn_ctr870_AnnualReportModule_arLTDebtToEquity_arItemTitle" title="[Long-term Debt / Total Equity]
[Normal Long-term Debt to Equity Ratio is Less than 25% debt.
Short-term debt is ignored. There is normally enough cash available to pay the short-term debt.
Ratios are more meaningful if compared to other companies in the same industry." class="armItemTitle"
etc.
---------
I coded this with \n to separate the lines. As a test, I removed the \n from one of the tooltips, but that didn't change the behavior. It appears that the problem is that Firefox wants to display only a single line, perhaps a fixed number of characters and long tooltips don't work. | | | |
|
John Mitchell Posts:3479


| |
jncraig Posts:83

| | 07/03/2007 2:26 PM |
| | Thanks! | | | |
|
jncraig Posts:83

| | 07/03/2007 5:33 PM |
| Can I hit you up for a little programming education, too?
I'm using the tooltips in a control that I've created. The control has a couple of text boxes in a table, and I can add the tooltop onmouseover to the < td> < /td> in the control's .ascx file. But, the text that I want displayed in the tooltip is in a variable that lives in the .ascx.cs file.
How do I get the text and put it into ddrivetip?
I've tried ddrivetip(tooltipText) where tooltipText is the string where the text is stored. But it's not defined in the .ascx file. | | | |
|
John Mitchell Posts:3479


| | 07/03/2007 5:44 PM |
| I would output the text in a hidden DIV, and then on mouseover just display the div at the mouse position.
Or, an easy way to send text from the server into client-side javascript is to response.write out a global declaration.
Response.write ("<scripttype='text/javascript'>var ClientTooltip ='" & ServerToolTip & "'; <script>")
Then ClientToolTip will be available as a global JS variable. | | | |
|
jncraig Posts:83

| | 07/05/2007 11:04 PM |
| I need a slightly larger hint, please!
For the hidden DIV, how would I "output the text into a hidden div" ... and then how would I display it?
For the second part ... would this code go inside of the .cs file for the control? If I have several controls, how would I give a name to the ClientToolTip that would correspond to each control?
And ... as long as we are at it ... if I put a into the tooltip text (using hardcoded text) the line breaks work in IE but not in Firefox. Is there some other linebreak character I should be using in the javascript text?
Thanks for your great help. | | | |
|
jncraig Posts:83

| | 07/06/2007 12:13 AM |
| I found that if I do the Response.Write inside of the ascx file, then I can create a js global variable for each instance of the control by using this.ID.ToString()+"TooltipText" as the name of the variable.
Now, my problem is onMouseover="ddrivetip(ClientTooltip )"
Since this occurs in the ascx part of my control's definition, I'm looking for a way to programmatically get if to find the right text.
Actually, what I'd like to have is an "in-between" routine that is like ddrivetip but doesn't include the text as a variable. Instead, dddrive-1 would know the name of the control that's calling it and would get the text for the tooltip by "getting" it directly from the control.
How might I do that? ... if it's possible ... | | | |
|