| Issue 399: | Problem withe IE 7-8 | |
| 1 person starred this issue and may be notified of changes. | Back to list |
Hi, here my web site : www.cramayailes-indoor.org
Menu "Calendrier"
Under Firefox, all works fine, i see my events.
Under IE 6 too.
Under IE7-8, I see no events. I look at my data, here un example :
[
{"id":"19","title":"Gymnase fermé, rencontre de BERCK","start":"2010-04-
17","end":"2010-04-18"},
{"id":"20","title":"Rencontre de KERPEN","start":"2010-04-24","end":"2010-
04-25"},
{"id":"21","title":"Fermeture vacances scolaires","start":"2010-04-
18","end":"2010-05-02"},
{"id":"22","title":"Gymnase fermé, AG de la fédération","start":"2010-03-
13","end":"2010-03-13"},
{"id":"55","title":"Gymnase fermé : Rencontre de Brie Comte
Robert","start":"2010-05-08","end":"2010-05-09"},
{"id":"56","title":"Démo en exterieur a Rosny sous Bois. Le gymnase serra
fermer","start":"2010-06-20","end":"2010-06-20"},
{"id":"57","title":"Pas de gymnase competition autre
Association","start":"2010-03-27","end":"2010-03-27"},
{"id":"58","title":"Sortie Berck donc pas de gymnase","start":"2010-04-
17","end":"2010-04-17"}
]
no trailing comma anywhere..., no slasche, no quote....If I run my get
data php sub directly, I get my data back well. But ful calendar didn't
get it.
Any idea?
Mar 15, 2010
Project Member
#1
adamrs...@gmail.com
Status:
Done
Mar 15, 2010
Hi, No, it didn't, I already use that and I can't use json_encode because of my fai there is no json extension on his php.
Mar 15, 2010
what about utf8_encode ? http://php.net/manual/en/function.utf8-encode.php
Mar 16, 2010
if you don't have the built in json extension which comes with 5.2 you can install the pecl extension that it originated from: http://pecl.php.net/package/json
Mar 16, 2010
Ji Just to be sure (because I see you are oriented to accent character), I change directly in database all this characters, and the issue is the same : no data under ie, all data under FF....
Mar 16, 2010
Hello
Solved....
Here my original code that didn't work :
<?php
include "../connect.php";
header("Content-Type: text/html; Charset=UTF8");
mysql_query("SET NAMES UTF8");
$select="SELECT * FROM calendar ORDER BY idcalendar";
$result = mysql_query($select,$link) or die("Insert : " . mysql_error());
$total = mysql_num_rows($result);
$arr = array();
if($total)
{
echo "[";
$i=0;
while($row = mysql_fetch_array($result))
{
$Event=str_replace(CHR(13), ' ',utf8_decode($row['event']));
$Event=str_replace(CHR(10), ' ',$Event);
echo "{";
echo '"id":"'.$row['idcalendar'].'",';
echo '"title":"'.$Event.'",';
echo '"start":"'.$row['debut'].'",';
echo '"end":"'.$row['fin'].'"';
if (++$i<$total)
echo "},";
else
echo "}";
}
echo "]";
}
mysql_close($link);
?>
And the code that work (see echo placement of "[" and echo "]") :
<?php
echo "[";
include "../connect.php";
header("Content-Type: text/html; Charset=UTF8");
mysql_query("SET NAMES UTF8");
$select="SELECT * FROM calendar ORDER BY idcalendar";
$result = mysql_query($select,$link) or die("Insert : " . mysql_error());
$total = mysql_num_rows($result);
$arr = array();
if($total)
{
$i=0;
while($row = mysql_fetch_array($result))
{
$Event=str_replace(CHR(13), ' ',utf8_decode($row['event']));
$Event=str_replace(CHR(10), ' ',$Event);
echo "{";
echo '"id":"'.$row['idcalendar'].'",';
echo '"title":"'.$Event.'",';
echo '"start":"'.$row['debut'].'",';
echo '"end":"'.$row['fin'].'"';
if (++$i<$total)
echo "},";
else
echo "}";
}
}
echo "]";
mysql_close($link);
?>
If someone cant tell me why first code get notingh from webserver and second work, he
would be welcome.
|
|
| ► Sign in to add a comment |