View Single Post
Old 08-11-2012, 12:26 PM   PM User | #1
sonic656
New Coder

 
Join Date: Sep 2011
Location: 127.0.0.1
Posts: 62
Thanks: 18
Thanked 0 Times in 0 Posts
sonic656 is an unknown quantity at this point
$.ajax not working in FF :(

AJAX.JS:

Code:
$("#buttonLogout").click(function() {
	$.ajax({
		type: "GET",
		url: "/assets/ajax/logout.php"
	}).done(function( data ) {
		alert(data);
		window.location="/login.php";
	});
	alert("clicked");
});
LOGOUT.PHP:
PHP Code:
<?php
    session_start
();
    
$_SESSION['loggedin']=0;
    
$_SESSION['nick']="";
    echo 
1;
?>
The script doesn't alert anything and doesn't redirect me.


What I'm doing wrong?
__________________
My website is here: http://www.moowdesign.eu/. It is not complete yet, and I want to add language translations for some languages(including english).

Last edited by sonic656; 08-11-2012 at 01:08 PM..
sonic656 is offline   Reply With Quote