I am using Appfuse 2.0.1 with JSF archetype.
On one machine that uses IE 6.0.3790 I get the following Javascript error
when clicking on an item in the list page:

call.indexOf("return ") Property or method unsupported by the object

in the following function:

function highlightTableRows(tableId) {
    var previousClass = null;
    var table = document.getElementById(tableId); 
    var startRow = 0;
    // workaround for Tapestry not using thead
    if (!table.getElementsByTagName("thead")[0]) {
            startRow = 1;
    }
    var tbody = table.getElementsByTagName("tbody")[0];
    var rows = tbody.getElementsByTagName("tr");
    // add event handlers so rows light up and are clickable
    for (i=startRow; i < rows.length; i++) {
        rows[i].onmouseover = function() {
previousClass=this.className;this.className+=' over' };
        rows[i].onmouseout = function() { this.className=previousClass };
        rows[i].onclick = function() {
            var cell = this.getElementsByTagName("td")[0];
            var link = cell.getElementsByTagName("a")[0];
            if (link.onclick) {
                call = link.getAttribute("onclick");
                if (call.indexOf("return ") == 0) {
                    call = call.substring(7);
                } 
                // this will not work for links with onclick handlers that
return false
                eval(call);
            } else {
                location.href = link.getAttribute("href");
            }
            this.style.cursor="wait";
            return false;
        }
    }
}


The object "call" is not null (verified with js debugger) but it seems it
does not have the indexOf method.
Everything goes ok if using Firefox or IE 6.0.29 from other machines.
Anyone can help me?

Thanks

Vincenzo Caselli
-- 
View this message in context: 
http://www.nabble.com/Strange-JS-error-when-selecting-an-item-on-the-List-page-tp18372680s2369p18372680.html
Sent from the AppFuse - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to