Old code: Which works correctly when I test it using the same browser on my development Box
textbox.setAttribute("onkeyup", "suggest(this,\"" + column + "\",\"" + table + "\",\"" + where.replace(/'/g, "<:-:>") + "\");");
The new code checks to see if the browser thinks replace is a function then recreates the function if it says it is not a function. I have test both paths and both give me correct results on my development box.
var safewhere = where;
if (where.replace) {
var safewhere = where.replace(/'/g, "<:-:>")
}
else {
while (safewhere.indexOf("'") != -1) {
safewhere = safewhere.substring(0, safewhere.indexOf("'")) + "<:-:>" + safewhere.substring(safewhere.indexOf("'") + 1, safewhere.length)
}
}
.
.
.
textbox.setAttribute("onkeyup", "suggest(this,\"" + column + "\",\"" + table + "\",\"" + safewhere + "\");");
I just called the user and had them test page again and they got the same error. This may be a caching issue, but has anyone seen the original issue before or have any ideas why Firefox would say that replace is not a function one machine and not the other.

New Topic/Question
Reply


MultiQuote



|