Live Support, Chat, Upload Control and Rich Text Editor
Welcome to Support forums Sign in | Join | Help |Client Center

Problem with Safari extracting value typed into CuteEditor

  •  09-04-2009, 11:39 AM

    Problem with Safari extracting value typed into CuteEditor

    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;
    }
     
View Complete Thread
Powered by ASP.Net
Copyright 2003 - 2017 CuteSoft Components Inc.. All rights reserved.