If I have a small text everything is ok. But if I have a larger text it will disapear very quickly, so the user cant read it completly.
How can I control this ?????
// retrieve/set tooltip initial delay (use milliseconds)
var x = plugins.tooltip.delay
plugins.tooltip.delay = 0
// retrieve/set tooltip time until dismiss (use milliseconds)
var y = plugins.tooltip.dismiss
plugins.tooltip.dismiss = 1000
Tokajac wrote:Tooltip control via above plugin works well in Smart Client, but not in WebClient?
Is there any version that works for WebClient also? Where can I find it?
If not, how to implement extension for WebClient?
<div style="white-space:nowrap;" class="label" id="sv_46A5EE99_E1E7_495F_A887_F6965D53CE6E" onmouseover="showtip(event, 'Tooltip text here');" onmouseout="hidetip();" tabIndex="-1">Company</div>
<script type="text/javascript" ><!--/*--><![CDATA[/*><!--*/
var tipTimeout;
function showtip(e,message)
{
var x = 0;
var y = 0;
var m;
if(!e)
var e = window.event;
var targetParentWidth = 0;
var targetParentHeight = 0;
var src = e.target;
if(!src)
src = e.srcElement;
if(src.parentNode)
{
var positionXY = getXY(src.parentNode);
var sizeWH = getRootElementSize(src.parentNode);
targetParentWidth = positionXY[0] + sizeWH[0];
targetParentHeight = positionXY[1] + sizeWH[1];
}
var wWidth = 0, wHeight = 0;
if( typeof( window.innerWidth ) == 'number' )
{
wWidth = window.innerWidth;
wHeight = window.innerHeight;
}
else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) )
{
wWidth = document.documentElement.clientWidth;
wHeight = document.documentElement.clientHeight;
}
else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) )
{
wWidth = document.body.clientWidth;
wHeight = document.body.clientHeight;
}
if(e.pageX || e.pageY)
{
x = e.pageX;
y = e.pageY;
}
else
if(e.clientX || e.clientY)
{
x = e.clientX + document.body.scrollLeft + document.documentElement.scrollLeft;
y = e.clientY + document.body.scrollTop + document.documentElement.scrollTop;
}
m = document.getElementById('mktipmsg');
m.innerHTML = message;
m.style.display = "block";
m.style.left = x + 20 + "px";
m.style.top = y - 4 + "px";
setTimeout("adjustTooltip("+x+","+targetParentWidth+","+wWidth +","+y+","+targetParentHeight+","+wHeight+");", 0);
m.style.zIndex = 203;
tipTimeout = setTimeout("hidetip();", 5000);
}
function adjustTooltip(x,targetParentWidth,wWidth,y,targetParentHeight,wHeight)
{
m = document.getElementById('mktipmsg');
var tooltipOffsetWidth = x + 20 + m.offsetWidth;
if((targetParentWidth < tooltipOffsetWidth || wWidth < tooltipOffsetWidth)&&(x - 20 -m.offsetWidth>=0))
m.style.left = x - 20 -m.offsetWidth + "px";
var tooltipOffsetHeight = y - 4 + m.offsetHeight
if((targetParentHeight < tooltipOffsetHeight || wHeight < tooltipOffsetHeight)&&(y - 4 - m.offsetHeight>=0))
{
m.style.top = y - 4 - m.offsetHeight + "px";
}
}
function hidetip()
{
clearTimeout(tipTimeout);
var m;
m = document.getElementById('mktipmsg');
m.style.display = "none";
}
/*-->]]>*/</script>
tipTimeout = setTimeout("hidetip();", 5000);
david wrote:
Disclaimer: this is a hack However, it's easy to restore to Servoy's default state. Just delete "MainPage.html" and Servoy will regenerate the original file.
Users browsing this forum: No registered users and 4 guests