Witam,
mam problem z przesylaniem getem polskich znakow. Pod firefox'em nie ma takiego problemu tylko pod IE.. do wyslania zmiennych uzywam ajax'a. W jaki sposob wyslac zmienna zeby ie nie robil krzakow?
index.php
<?php
<html>
<head>
<title>Edycja danych pracowników</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<link rel="stylesheet" href="include/style.css" type="text/css">
<script type="text/javascript">
//***************// AJAX FUNCTION
function ajaxSzukaj(){
var ajaxRequest;
try{
// Opera 8.0+, Firefox, Safari
ajaxRequest = new XMLHttpRequest();
} catch (e){
// Internet Explorer Browsers
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('szukaj');
ajaxDisplay.innerHTML = ajaxRequest.responseText;
}
}
var string = document.getElementById('string').value;
var queryString = "?string=" + string;
ajaxRequest.open("GET", "function/form_szukaj.php" + queryString, true);
ajaxRequest.send(null);
}
</script>
</head>
<body>
<form
action="form_edycja.html"
name="basicform"
id="basicform"
method="post" >
1. Szukamy po nazwisku, oddziale, tel. stacjonarnym, komórkowym
<fieldset>
<label for="username">Szukaj:</label>
<input
type="text"
id="string" />
</fieldset>
<input type='button' onclick='ajaxSzukaj()' value='Szukaj' />
</form>
<div id='szukaj'></div>
</body>
</html>
?>
form_szukaj.php
<?php
include('../include/connect.php');
$szukaj = "SELECT * FROM Telefony WHERE nazwisko LIKE '%$_GET[string]%' OR telefons LIKE '%$_GET[string]%' OR oddzial LIKE '%$_GET[string]%' OR telefonk LIKE '%$_GET[string]%'";
?>