merhaba,

POST metodunu kullanınca sorun çözüldü.

teşekkürler,
Mustafa  Aldemir

--- On Tue, 1/27/09, NURI AKMAN <[email protected]> wrote:

From: NURI AKMAN <[email protected]>
Subject: [Linux-programlama] YNT:  AJAX'ta türkçe sorunu
To: "Özgür yazılımlarla çeşitli dillerde yazılım geliştirme" 
<[email protected]>
Date: Tuesday, January 27, 2009, 11:30 PM

Form'u GET ile değil de POST ile gönderin. Sorun düzelecektir.

Selamlar,
Nuri AKMAN


-----Özgün İleti-----
Kimden: [email protected] bu kişinin yerine: 
[email protected]
Gönderilmiş: Sal 27.01.2009 17:59
Kime: [email protected]
Konu: [Linux-programlama] AJAX'ta türkçe sorunu
 
merhaba,

AJAX kullanarak forma girilen verileri veritabanına kaydeden bir sayfa 
hazırladım. Bende Firefox'ta güzel çalışıyor ama bazı bilgisayarlardaki 
Firefox'larda ve tüm Explorer'larda bir sorun var. Kaydetmek istediğim metnin 
ilk Türkçe karakterine kadar olanı kaydediliyor, sonrası yok :(

Kodlarım aşağıda, bir fikir verebilen olur mu?

sevgiler,
Mustafa


---------
index.php:

function slaytKaydet(slaytNo){

  var ajaxRequest;


  try{

    ajaxRequest = new XMLHttpRequest();

  } catch (e){

    try{

      ajaxRequest = new ActiveXObject("Msxml2.XMLHTTP");

    } catch (e) {

      try{

        ajaxRequest = new ActiveXObject("Microsoft.XMLHTTP");

      } catch (e){

        alert("Your browser broke!");

        return false;

      }

    }

  }


  ajaxRequest.onreadystatechange = function(){

    if(ajaxRequest.readyState == 4){

      var ajaxDisplay = document.getElementById('ajaxDiv');

      ajaxDisplay.innerHTML = ajaxRequest.responseText;

    }

  }

  var video_id = document.getElementById('video_id').value;

  var timecode = document.getElementById('timecode').value;

  var baslik = document.getElementById('baslik').value;

  var queryString = "?video_id=" + video_id + "&timecode=" + timecode + 
"&slayt=" + slaytNo + "&baslik=" + baslik;

  ajaxRequest.open("GET", "kaydet.php" + queryString, true);

  ajaxRequest.send(null);


}



---------
kaydet.php:

<?php

    $host="localhost";
    $database="";
    $uname="";
    $pass="";

    $connection = mysql_connect($host,$uname,$pass)
            or die ("MySQL'e Bağlanılamadı!");
    $connection1 = mysql_select_db($database)
            or die ("Veritabanı Seçilemedi!");

    mysql_query("SET NAMES 'utf8'");
    mysql_query("SET CHARACTER SET 'utf8'");
    mysql_query("SET COLLATION_CONNECTION='utf8_general_ci'");





    $video_id    = $_GET['video_id'];

    $timecode    = $_GET['timecode'];

    $slayt        = $_GET['slayt'];

    $baslik        = $_GET['baslik'];



    $sorgu = "INSERT INTO `sunum` ( `slayt_no` , `video_id` , `saniye` , 
`slayt` , `baslik` ) VALUES ( NULL , '$video_id', '$timecode', '$slayt', 
'$baslik' );";


    mysql_query($sorgu);

    $keyword_id=mysql_insert_id();



    echo '<table border="1" width="400">

    <tr>

        <td width="40">Saniye</td>

        <td width="40">Slayt</td>

        <td>Baslik</td>

        <td width="40">Islem</td>

    </tr>';

        $sorgu = "SELECT * FROM `sunum` where `video_id` = '$video_id' order by 
`saniye` desc";

        $yaz=mysql_query($sorgu);

        while($oku=mysql_fetch_assoc($yaz)){

        $slaytno = $oku['slayt_no'];

        $saniye = $oku['saniye'];

        $slayt = $oku['slayt'];

        $baslik = $oku['baslik'];

        echo '



    <t>

                <td><a 
onClick="playerID.sendEvent(\'SEEK\','.$saniye.')"><u>'.$saniye.'</u></a></td>

                <td>'.$slayt.'</td>

                <td>'.$baslik.'</td>

                <td><a onClick="slaytSil('.$slaytno.')"><u>Sil</u></a></td>

    </tr>';

    }

    

    mysql_close();

?>


      
_______________________________________________
Linux-programlama mailing list
[email protected]
http://liste.linux.org.tr/mailman/listinfo/linux-programlama



-----Inline Attachment Follows-----

_______________________________________________
Linux-programlama mailing list
[email protected]
http://liste.linux.org.tr/mailman/listinfo/linux-programlama



      
_______________________________________________
Linux-programlama mailing list
[email protected]
http://liste.linux.org.tr/mailman/listinfo/linux-programlama

Cevap