Javascript-форум (https://javascript.ru/forum/)
-   Internet Explorer (https://javascript.ru/forum/css-html-internet-explorer/)
-   -   Добрый день, проблемы с русскими буквами (https://javascript.ru/forum/css-html-internet-explorer/13187-dobryjj-den-problemy-s-russkimi-bukvami.html)

Sea11 19.11.2010 10:35

Добрый день, проблемы с русскими буквами
 
Здравствуйте, помогите пожалста, знания самому не позволяют исправить ошибку

на сайте есть , форма оставления отзыва
ФИО, E-MAIL, Сообщение

В гугле, мозилле, печатаем все хорошо, отправляется ,отзыв появляется.
В ИЕ же, печатая именно РУССКИМИ Буквами, сообщения появляется, но обновив браузер, оно исчезает. В чем может быть проблема

форма, отправки

<script language="javascript">
	function addMessage() {
		var fio = $('message_fio').value;
		var email = $('message_email').value;
		var text = $('message_text').value;
		$('message_inc_error').innerHTML = '<img src="/images/progress1.gif">';
		ajax_loadInto('/data/backend/ajax.php?act=addmessage&partid={{PARTID}}&fio='+fio+'&email='+email+'&text='+text,'message_inc_error');
		$('message_fio').value = '';
		$('message_email').value = '';
		$('message_text').value = '';
		if (fio&&text) {
			$('message_new').innerHTML = $('message_new').innerHTML + '<div>'+
				'<div style="padding:10px;" class="textb">'+
				'	<div style="float:left;">'+fio+'</div>'+
				'	<div style="float:right;">только что</div>'+
				'</div>'+
				'<div style="padding:10px;border-bottom:1px dotted #555555;">'+text+'</div>'+
				'</div>';
		}
	}
</script>
<div>
	<div style="padding:10px;">
		<center>
			<table border=0 cellpadding=5 cellspacing=0 width="400px;" style="border:1px solid #B1BDD6;background-color:#DAE2E8;">
				<tr style="background-color:#EEE5B8;"><td class="textb" colspan="2" style="font-size:15px;border-bottom: 1px solid #cccccc;">Оставить отзыв</td></tr>
				<tr><td colspan="2"><div class="textb" id="message_inc_error" style="color:#f00;"></div></td></tr>
				<tr><td align="right">ФИО:</td><td width="70%"><input type="text" id="message_fio" style="background-color:#ffffff;color:#2B587A;width:100%;" value=""></td></tr>
				<tr><td align="right">E-mail:</td><td><input type="text" style="background-color:#ffffff;color:#2B587A;width:100%;" id="message_email" value=""></td></tr>
				<tr><td align="right">Сообщение:</td></tr>
				<tr><td colspan="2"><textarea style="width:100%;height:70px;background-color:#ffffff;color:#2B587A;" id="message_text"></textarea></td></tr>
				<tr><td colspan="2" align="right"><input type="button" value="Отправить" onclick="addMessage();"></td></tr>
			</table>
		</center>
	</div>
</div>
<div id="message_new"></div>



ajax.php

if ($act == "addmessage") {
		$fio = $_GET['fio'];
		$email = $_GET['email'];
		$text = $_GET['text'];

		
		$partid = $_GET['partid'];
		settype($partid,"int");
		$fio = str_replace("'","",$fio);
		$fio = str_replace('"',"",$fio);
		$fio = htmlspecialchars($fio);
		$email = str_replace("'","",$email);
		$email = str_replace('"',"",$email);
		$email = htmlspecialchars($email);
		$text = str_replace("'","",$text);
		$text = str_replace('"',"",$text);
		$text = htmlspecialchars($text);
		if (!$fio) { print "Введите ФИО!"; exit; }
		if (!$text) { print "Введите текст сообщения!"; exit; }
		if ($fio&&$text&&$partid) {
			$sql->Req("insert into partitions_guests(`partid`,`fio`,`email`,`date`,`text`) values('".$partid."','".$fio."','".$email."',now(),'".$text."');");
			print "Добавлено!";
		}
	}

monolithed 21.11.2010 19:21

Приведите только то, что на выходе получается

Sea11 22.11.2010 12:31

На выходе запись в базу данных с пустым поле ФИО, ЕМЕЙЛ и отзыв

monolithed 22.11.2010 15:00

HTML и JS (что клиенту отдали) , без PHP

Sea11 26.11.2010 12:16

вот все что у клиента

<script language="javascript">
	function addMessage() {
		var fio = $('message_fio').value;
		var email = $('message_email').value;
		var text = $('message_text').value;
		$('message_inc_error').innerHTML = '<img src="/images/progress1.gif">';
		ajax_loadInto('/data/backend/ajax.php?act=addmessage&partid={{PARTID}}&fio='+fio+'&email='+email+'&text='+text,'message_inc_error');
		$('message_fio').value = '';
		$('message_email').value = '';
		$('message_text').value = '';
		if (fio&&text) {
			$('message_new').innerHTML = $('message_new').innerHTML + '<div>'+
				'<div style="padding:10px;" class="textb">'+
				'	<div style="float:left;">'+fio+'</div>'+
				'	<div style="float:right;">только что</div>'+
				'</div>'+
				'<div style="padding:10px;border-bottom:1px dotted #555555;">'+text+'</div>'+
				'</div>';
		}
	}
</script>


<div>
	<div style="padding:10px;">
		<center>
			<table border=0 cellpadding=5 cellspacing=0 width="400px;" style="border:1px solid #B1BDD6;background-color:#DAE2E8;">
				<tr style="background-color:#EEE5B8;"><td class="textb" colspan="2" style="font-size:15px;border-bottom: 1px solid #cccccc;">Оставить отзыв</td></tr>
				<tr><td colspan="2"><div class="textb" id="message_inc_error" style="color:#f00;"></div></td></tr>
				<tr><td align="right">ФИО:</td><td width="70%"><input type="text" id="message_fio" style="background-color:#ffffff;color:#2B587A;width:100%;" value=""></td></tr>
				<tr><td align="right">E-mail:</td><td><input type="text" style="background-color:#ffffff;color:#2B587A;width:100%;" id="message_email" value=""></td></tr>
				<tr><td align="right">Сообщение:</td></tr>
				<tr><td colspan="2"><textarea style="width:100%;height:70px;background-color:#ffffff;color:#2B587A;" id="message_text"></textarea></td></tr>
				<tr><td colspan="2" align="right"><input type="button" value="Отправить" onclick="addMessage();"></td></tr>
			</table>
		</center>
	</div>
</div>
<div id="message_new"></div>


Часовой пояс GMT +3, время: 22:06.