<?
if (isset($_POST['elkuld'])) {
    
header('Content-Type: text/javascript; charset=utf-8');
    die(
"alert('Working!')");
}
header('Content-Type: text/html; charset=utf-8');
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Test</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<script type="text/javascript" src="http://github.com/malsup/form/raw/master/jquery.form.js"></script>
<script type="text/javascript">
function Teszt() {
    $('#ezaform').ajaxSubmit({
        data: {
            elkuld: 123
        },
        success: function(valasz,status,xhr,elem) {
            eval($(valasz).text());
        }
    });
}
</script>
</head>
<body>
<form id="ezaform" method="post" action="<?=$_SERVER['PHP_SELF']?>" enctype="multipart/form-data">
<p><input type="file" name="lufi"/></p>
<p><input type="button" value="Test!" onclick="Teszt()"/></p>
</form>
<div><?highlight_file(__FILE__)?></div>
</body>
</html>