ต้องการอ้างถึง id ของ FCKeditor


เราสร้าง Class FCKeditor ขึ้นมาแล้ว ถ้าต้องการตรวจสอบด้วย java

<script>
     var FCKeditor= document.getElementById("????????").value;//จะอ้างถึง id ยังไงครับ
if(FCKeditor==""){
    alert("ค่าว่างใน FCKeditor");
}
</script>


$oFCKeditor = new FCKeditor('FCKeditor1') ;
                $oFCKeditor->BasePath = 'tool/FCKeditor/';
                $oFCKeditor->Width  = '100%' ;
                $oFCKeditor->Height = '600' ;
                $oFCKeditor->Create();
21 พ.ค. 2552 4 2,303

ไม่ได้ครับ

ถ้าต้องการจะอ้างถึง editor ของ fckeditor ให้ศึกษาเกี่ยวกับ API ของ fckeditor ครับ

ตัวอย่างของ fckeditor เองก็มีบอกไว้ครับ
#1

ตัวอย่าง

<form>
<textarea name="detail" id="detail" cols="45" rows="5"></textarea>
</form>

<script type="text/javascript">
<!--
var oFCKeditor = new FCKeditor('detail');
oFCKeditor.BasePath = './FCKeditor/';
oFCKeditor.Width = '100%';
oFCKeditor.Height = '500';
oFCKeditor.Config["AutoDetectLanguage"] = false ;
oFCKeditor.Config["DefaultLanguage"]    = 'th' ;
oFCKeditor.ReplaceTextarea() ;


function chk(obj)
    {
       /*อ้างถึง ID*/
        var detail=FCKeditorAPI.GetInstance('detail').GetHTML();

       /*ถ้าไม่ได้ใส่ข้อมูลมันจะมีค่า <br /> ค้างอยู่ อันนี้ลองดึงมาค่าตรวจสอบก่อนนะครับ*/

        if(detail=="<br />"){alert("ระบุรายละเอียด");return false;}
    }
//-->

</script>

#2

ขอบคุณที่ตอบนะครับ

ขอถามอีกอย่างทำอย่างไรเวลาเรา insert mysql แล้วภาษาไทยของเรากลายเป็น ?????? หมดเลยครับรบกวนอีกรอบ
#3

อ้างอิงจาก ความคิดเห็น #3ขอบคุณที่ตอบนะครับ

ขอถามอีกอย่างทำอย่างไรเวลาเรา insert mysql แล้วภาษาไทยของเรากลายเป็น ?????? หมดเลยครับรบกวนอีกรอบ


$sql="insert into profile values('','$user','$password','$name_th','$sur_th','$tel','')";
mysql_query("SET NAMES 'tis620'");<---------เพิ่มตรงนี้
mysql_query($sql,$conn);
mysql_close($conn);
#4
ความคิดเห็น
ไฟล์อัปโหลด ชนิด jpg, jpeg ขนาดไฟล์ไม่เกิน 1024
^