PDA

View Full Version : [CLOSED] Script error on page with tooltip and master page



sisa
Feb 26, 2013, 10:38 AM
Hi,

I have a great problem with tooltip on master page. On masterpage is a grid with an tooltip on each cell in a colum. If i move up and down with the mouse after a short time I will get this error: Unresponsive Script Warning.
The behavior is the same in Firefox and IE.
If I use the grid with the tooltip without masterpage it works.
Did you know anything about this problem.

Kind regards
Elke

Vladimir
Feb 26, 2013, 11:21 AM
I guess that problem can be related with ID
If master page is used then widgets ID doesn't equal ClientID (we use ClientID on the client side)
For example, if you use in the javascript code


App.Panel1

then can be a problem because Panel1 is not ClientID if master page is used

Solution: use #{} syntax (if script on the page) or set IDMode="Static" for required widget

sisa
Feb 26, 2013, 2:29 PM
I guess that problem can be related with ID
If master page is used then widgets ID doesn't equal ClientID (we use ClientID on the client side)
For example, if you use in the javascript code


App.Panel1

then can be a problem because Panel1 is not ClientID if master page is used

Solution: use #{} syntax (if script on the page) or set IDMode="Static" for required widget




yes, I use #{} syntax

and my script is:


var showPermitGridToolTip = function (toolTip, grid, eventstore, body) {
var view = grid.getView();
var rowIndex = view.findItemByChild(toolTip.triggerElement).viewI ndex;
var column = view.getHeaderByCell(toolTip.triggerElement);
if (column != undefined) {
var fieldName = column.dataIndex;
var store = eventstore;
if (isDashboard != undefined && isDashboard != false) {
if (fieldName == "Provider") {
var record = store.getAt(rowIndex);
body.dom.innerHTML = GetText(record);
}
else if (fieldName == "Requestor") {
var record = store.getAt(rowIndex);
body.dom.innerHTML = GetText(record); //get Html from record
}
else {
toolTip.hide();
}

}
}
return false;
};

Kind regards
Elke

Vladimir
Feb 26, 2013, 2:45 PM
Please provide runable sample reproduces the issue