[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4284: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3493)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4286: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3493)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4287: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3493)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4288: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3493)
www.dhtmlgoodies.com • View topic - Problem with Tooltips with Transparent Shadow
Advertisement

Problem with Tooltips with Transparent Shadow

Moderators: Calcifer, slothy

Problem with Tooltips with Transparent Shadow

Postby kraj » Thu May 18, 2006 10:15 pm

Alf,

First of all, thank you for such great scripts. Your scripts have facilitated me to significantly and easily enhance the appearance of my web applications.

I am using the Shadow Tooltips in an application which is cross-browser.
The application is accessed via https.

On IE, the first time a tooltip is about to be loaded I am asked if I would like to see non-secure items on the page.
On Opera (I am using Opera 8.54, the tooltip frame is displayed (although with a different background color thatn what we have defined in the style sheet), but the text content is not displayed at all.

I was able to reproduce the Opera quirk on your demo page.

Any ideas on how to resolve this?

Thank you in advance,

Benjamin
kraj
 
Posts: 5
Joined: Sun Apr 16, 2006 10:32 pm

Postby kraj » Fri May 19, 2006 1:36 am

Alf,

Update. It works fine in Opera. My Opera was set up to identify itself as IE. I found the setting, changed it to Opera, and now it works fine.

Only issue I still have is the "non-secure" items on IE.
kraj
 
Posts: 5
Joined: Sun Apr 16, 2006 10:32 pm

Postby Batalf » Fri May 19, 2006 9:31 am

Batalf
Site Admin
 
Posts: 2160
Joined: Sat Oct 22, 2005 9:38 pm

Postby kraj » Fri May 26, 2006 9:35 pm

kraj
 
Posts: 5
Joined: Sun Apr 16, 2006 10:32 pm

Postby kraj » Wed May 31, 2006 3:37 am

kraj
 
Posts: 5
Joined: Sun Apr 16, 2006 10:32 pm

Postby Batalf » Sat Jun 03, 2006 11:39 am

Batalf
Site Admin
 
Posts: 2160
Joined: Sat Oct 22, 2005 9:38 pm

Postby Oppman29 » Wed Sep 20, 2006 8:55 pm

I also noticed the following problems:

1- if you have an embedded iframe the tooltip will not draw properly ontop of the iframe.

2- if you use the onlick instead of the mouse over to call the tooltip , you will get a script error if you hover and dont click becuase the onmouseout will try to delete the tooltip when its not there.

I fixed those problems added 2 optional parameters to be passed to the function showTooltip(e,tooltipTxt,TooltipCustomMAXSize,TooltipCustomLocation)

Here is the updated code.


/**************************************
(C) www.dhtmlgoodies.com, October 2005

This is a script from www.dhtmlgoodies.com. You will find this and a lot of other scripts at our website.

Terms of use:
You are free to use this script as long as the copyright message is kept intact. However, you may not
redistribute, sell or repost it without our permission.

Thank you!

Updated: April, 6th 2006, Using iframe in IE in order to make the tooltip cover select boxes.

www.dhtmlgoodies.com
Alf Magne Kalleland

Modified May 30, 2006 by Benjamin Krajmalnik to provide for dynamic relocation on tooltip when page is scrolled.
Tested on IE6. Mozilla, and Opera 8

************************************************************************************
Updated: Sept 2006, Custom Sizing, Custom Positioning
USAGE showTooltip(event,Message,OptionalZize,OptionalZizePosition)

Sample
"showTooltip(event,'Hi There');return false"

Sample2
"showTooltip(event,'Hi There',200,50);return false"
*****************************/

var dhtmlgoodies_tooltip = false;
var dhtmlgoodies_tooltipShadow = false;
var dhtmlgoodies_shadowSize = 1;
var dhtmlgoodies_tooltipMaxWidth2 = 200;
var dhtmlgoodies_tooltipMinWidth = 20;
var dhtmlgoodies_iframe = false;
var tooltip_is_msie = (navigator.userAgent.indexOf('MSIE')>=0 && navigator.userAgent.indexOf('opera')==-1 && document.all)?true:false;

var Opptooltip_created = 0;
function showTooltip(e,tooltipTxt,TooltipCustomMAXSize,TooltipCustomLocation)
{ dhtmlgoodies_tooltipMaxWidth =0;
Opptooltip_created = 0;
var bodyWidth = Math.max(document.body.clientWidth,document.documentElement.clientWidth) - 20;
var bodyHeight = document.body.clientHeight - 20;

if(!dhtmlgoodies_tooltip){
dhtmlgoodies_tooltip = document.createElement('DIV');
dhtmlgoodies_tooltip.id = 'dhtmlgoodies_tooltip';
dhtmlgoodies_tooltipShadow = document.createElement('DIV');
dhtmlgoodies_tooltipShadow.id = 'dhtmlgoodies_tooltipShadow';

document.body.appendChild(dhtmlgoodies_tooltip);
document.body.appendChild(dhtmlgoodies_tooltipShadow);

if(tooltip_is_msie){
dhtmlgoodies_iframe = document.createElement('IFRAME');
dhtmlgoodies_iframe.frameborder='5';
dhtmlgoodies_iframe.style.backgroundColor='#FFFFFF';
dhtmlgoodies_iframe.src = 'Blank.html';
dhtmlgoodies_iframe.style.zIndex = 100;
dhtmlgoodies_iframe.style.position = 'absolute';
document.body.appendChild(dhtmlgoodies_iframe);
}

}

dhtmlgoodies_tooltip.style.display='block';
dhtmlgoodies_tooltipShadow.style.display='block';
if(tooltip_is_msie)dhtmlgoodies_iframe.style.display='block';

var st = Math.max(document.body.scrollTop,document.documentElement.scrollTop);
var st2 = Math.max(document.body.scrollLeft,document.documentElement.scrollLeft);

if (e.pageX) {
leftPos = e.pageX + 10;
topPos2 = e.pageY + 10;
}
else if (e.clientX)
{
leftPos = e.clientX + 10 + st2;
topPos = e.clientY + 10 + st;
}

dhtmlgoodies_tooltip.style.width = null; // Reset style width if it's set
dhtmlgoodies_tooltip.innerHTML = tooltipTxt;
dhtmlgoodies_tooltip.style.left = leftPos + 'px';
dhtmlgoodies_tooltip.style.top = e.clientY + 10 + st + 'px';


dhtmlgoodies_tooltipShadow.style.left = leftPos + dhtmlgoodies_shadowSize + 'px';
dhtmlgoodies_tooltipShadow.style.top = topPos + dhtmlgoodies_shadowSize + 'px';

var tooltipWidth = tooltipTxt.length * 7;

if(tooltipWidth<dhtmlgoodies_tooltipMinWidth)tooltipWidth = dhtmlgoodies_tooltipMinWidth;

/* check to see if a custom max size was passed*/

if (showTooltip.arguments.length >2)
{
dhtmlgoodies_tooltipMaxWidth= showTooltip.arguments[2]
}
else
{
dhtmlgoodies_tooltipMaxWidth=dhtmlgoodies_tooltipMaxWidth2
}
/* if nothing was passed then we will use the deault*/


if(tooltipWidth > dhtmlgoodies_tooltipMaxWidth){ /* Exceeding max width of tooltip ? */
tooltipWidth = dhtmlgoodies_tooltipMaxWidth ;
}


dhtmlgoodies_tooltip.style.width = tooltipWidth + 'px';
dhtmlgoodies_tooltipShadow.style.width = dhtmlgoodies_tooltip.offsetWidth + 'px';

var tooltipHeight = dhtmlgoodies_tooltip.offsetHeight;
dhtmlgoodies_tooltipShadow.style.height = dhtmlgoodies_tooltip.offsetHeight + 'px';


if((leftPos + tooltipWidth)>bodyWidth + st2){
leftPos = bodyWidth + st2 - (tooltipWidth+20);
}
if((topPos + tooltipHeight)>bodyHeight + st){
topPos = bodyHeight+st - (tooltipHeight+20);
}
dhtmlgoodies_tooltip.style.left = leftPos + 'px';
dhtmlgoodies_tooltipShadow.style.left = leftPos + dhtmlgoodies_shadowSize + 'px';

/* check to see if a custom Position was passed*/

if (showTooltip.arguments.length >3)
{
OppMYPosition= showTooltip.arguments[3]
}
else
{
OppMYPosition=topPos
}
/* if nothing was passed then we will use Best choice best on screen*/


dhtmlgoodies_tooltip.style.top = OppMYPosition + 'px';
dhtmlgoodies_tooltipShadow.style.top = OppMYPosition+ dhtmlgoodies_shadowSize + 'px';
if(tooltip_is_msie){
dhtmlgoodies_iframe.style.left = dhtmlgoodies_tooltip.style.left;
dhtmlgoodies_iframe.style.top = dhtmlgoodies_tooltip.style.top;
dhtmlgoodies_iframe.style.width = dhtmlgoodies_tooltip.offsetWidth + 'px';
dhtmlgoodies_iframe.style.height = dhtmlgoodies_tooltip.offsetHeight + 'px';

}
Opptooltip_created = 2 ;
setTimeout('hideTooltip()',5000);
}

function hideTooltip()
{ if (Opptooltip_created > 0)
{dhtmlgoodies_tooltip.style.display='none';
dhtmlgoodies_tooltipShadow.style.display='none';
if(tooltip_is_msie)dhtmlgoodies_iframe.style.display='none'; }
Opptooltip_created =0;
}
Oppman29
 
Posts: 6
Joined: Tue Aug 01, 2006 5:47 am


Return to Questions regarding other scripts at www.dhtmlgoodies.com

Who is online

Users browsing this forum: No registered users and 10 guests

cron