WebFX WebBoard
Message Thread:
View All Messages
Back to WebFX
 Sortable Table and Safari, Derw, July 8, 2004
     Re:Sortable Table and Safari, Derw, July 8, 2004
         Re:Sortable Table and Safari - see quirksmode, stylo~, July 13, 2004
             Re:Sortable Table and Safari - see quirksmode, Dan, July 21, 2004
                 Re:Sortable Table and Safari - see quirksmode, Erik Arvidsson, July 21, 2004
                     Re:Sortable Table and Safari - see quirksmode, Doron, November 24, 2004

Subject: Re:Sortable Table and Safari - see quirksmode From: Doron Date: November 24, 2004
I solved the issue by commenting out from the initHeader function the part that attaches the onclick event-handler (see below). Then I added the onclick event-handler inline (onclick="st.sort(0,false);"). I used a variable to determent the descending value and used a function to toggel the value of that variable.

SortableTable.prototype.initHeader = function (oSortTypes) {
var cells = this.tHead.rows[0].cells;
var l = cells.length;
var img, c;
for (var i = 0; i < l; i++) {
c = cells[i];
img = this.document.createElement("IMG");
img.src = "../images/buttons/blank.png";
img.style.width = "7px";
img.style.height = "7px";

c.appendChild(img);
if (oSortTypes[i] != null) {
c._sortType = oSortTypes[i];
}
// if (typeof c.addEventListener != "undefined")
//c.addEventListener("click", this._headerOnclick, false);
//else if (typeof c.attachEvent != "undefined")
// c.attachEvent("onclick", this._headerOnclick);
//else
// c.onclick = this._headerOnclick;
}
this.updateHeaderArrows();
;

Hope this is helpful.

Doron



Reply
Name: 
Email: 
Subject: 

Enter your reply to this message below. HTML tags are not supported but words that start with http://, ftp:// or mailto: are converted to links.


View All Messages
Back to WebFX