[eluser]FordEscort[/eluser]
Hi all.
I'm using IE 8.0.6001.18702 and Firefox 3.5.3.
I have a problem with CI's session when dealing with jQuery.load method.
In Firefox everything is OK but in IE it seems that the session is not recognized.
Here's a simplified sample code of my application :
controllers/test_session.php :
Code:
<?php
class Test_session extends Controller
{
function __construct()
{
parent::Controller();
}
function index()
{
$this->load->view('test_session');
}
/**
* La fonction qui changera la valeur en session et chargera le résultat dans le div
*/
function testLoad()
{
$Val = $this->session->userdata('testVal');
if (!empty($Val))
{
$Val++;
} else
{
$Val = 1;
}
echo $Val;
$this->session->set_userdata('testVal', $Val);
}
}
/* Fin du fichier test_session.php */
/* Emplacement: ./system/application/controllers/test_session.php */
views/test_session.php :
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html >
<head>
[removed][removed]
</head>
<body>
<div id="testDiv"></div>
[removed]
$(document).ready(function(){
$('#test_link').click(function(){
$('#testDiv').load('<?php echo site_url('test_session/testLoad'); ?>');
return false;
});
});
[removed]
<a href="#" id="test_link">Test</a>
</body>
</html>
Normally when I click on $('#test_link') the value displayed should increment but in IE it doesn't work.
Can you help me please.
Thanks.