When a user runs Safari, our web app uses javascript to extract the value typed into the CuteEditor, does some validation and posts the data db. The javascript code is invoked when a user clicks Submit. Our problem is that the code works flawlessly on other browsers (IE7, FF3 (pc and mac), but under Safari an empty value is returned.
Here is the Javascript we are using:
-var oOtherAnswer = getTextAnswerObject(oOther.form, "textentry." + id);
alert(oOtherAnswer.value); // in Safari, this always returns an empty string.
function
getTextAnswerObject(f,s){
for (var i=0;i<f.elements.length;i++){
el=f.elements[i];
if (!el.tagName.containsIgnoreCase('fieldset')) {
if (el.name.indexOf(s)>-1){
var oCE = document.getElementById("CE_" + el.name + "_ID");
if (oCE && oCE.getAttribute("_IsCuteEditor")) {
return oCE;
} else {
return el;
}
}
}
}
return null;
}