PDA

View Full Version : .40 - QuickTips playing - ie issue



Choleriker
27 Jan 2007, 6:30 AM
Hey,

your new lib is very nice! Im currently playing with the alpha because i want to use the quicktips widget.

Why quicktips are only useable in ie7 not for the versions before? I have found that line at the init function:



if(YAHOO.ext.util.Browser.isIE && !YAHOO.ext.util.Browser.isIE7){
return;
}


Is because of the the ownerDocument.createRange error i get on ie6 by using DomHelper.insertHtml? I get this error on another piece of my code. I dont want to add my help icons on a several divs manually, so i have written an extension to quicktips:



Ext.QuickTips.addTipIcon = function(config) {
if(typeof config.icon=='undefined') config.icon = '../images/16x16/help.png';
var _el = getEl(config.el);
var _dom = {tag:'img', src:config.icon, alt:'', 'y:qtip':config.msg, cls:'ytips-help-icon'};
if(typeof config.title!='undefined')
_dom['y:qtitle'] = config.title;
Ext.DomHelper.insertBefore(_el.dom.childNodes[0], _dom);
Ext.DomHelper.insertAfter(_el.dom, {tag:'span', style:'clear:both;'});
Ext.QuickTips.scan(_el);
};
Ext.QuickTips.addTipIcons = function() {
for(var i=0, l=arguments.length; i<l; i++)
Ext.QuickTips.addTipIcon(arguments[i]);
};


So now, if i use this one:



Ext.QuickTips.addTipIcons(
{el:'RoutingsSub-viewByGroupTitle', msg:Texts.RoutingMonitor_ViewTip, title:Texts.View},
{el:'RoutingsSub-intervalGroupTitle', msg:Texts.IntervalTip, title:Texts.Interval},
{el:'RoutingsSub-autoUpdateGroupTitle', msg:Texts.AutoUpdateTip, title:Texts.AutoUpdateLabel}
);


I get an error in ie6, that my object doesnt have this function. By debugging i found out that the error is thrown in DomHelper.insertHtml on this line:



var range = el.ownerDocument.createRange();


the ownerDocument is ok, the createRange call is the problem. The function is called with this arguments:

where: 'beforebegin'
html: "<img src=\"../images/16x16/help.png\" alt=\"\" y:qtip=\"Wählen Sie hier aus, in welcher Art und Weise die Verbindungen dargestellt werden sollen. \" class=\"ytips-help-icon\" y:qtitle=\"Ansicht\" />"

Any ideas? My customer want the quicktips if the new version of the software goes online but then we cant use it only if i get it rid in versions of ie before 7 too.

BernardChhun
12 Mar 2007, 5:59 AM
I'm having a similar issue. I'm adding some HTML into the title of the QuickTiped element.

it displays fine in Firefox:
http://i19.tinypic.com/4g5fz3q.png

IE6 has some trouble though:
http://i15.tinypic.com/35cecnq.png

I've been checking out the debug js file and I almost came to the same conclusion as Chloriker. I commented out that part where it checks for the browser and it still doesn't work :(

is there something that can be done here?

jack.slocum
12 Mar 2007, 10:55 PM
What version are you running?

BernardChhun
13 Mar 2007, 3:53 AM
What version are you running?

Will I sound strange if I say 0.40? :D

jack.slocum
13 Mar 2007, 4:22 AM
Time to upgrade! ;) ext:qtip attribute will help as well. (y:qtip in .40?).

BernardChhun
13 Mar 2007, 4:27 AM
Time to upgrade! ;) ext:qtip attribute will help as well. (y:qtip in .40?).

ahh I knew you'd say that. Unfortunately, the release of our web app is tomorrow and I don't have the time to work on the upgrade :cry: that will come in our second phase though. thanks anyway Jack!