return null in ajax
i have this code:

    <script type="text/javascript">
    $(document).ready(function(url) {
    
    function doAjax(url) {
        $("#customForm").submit(function() {
            var formdata = $("#customForm").serializeArray();
            $.ajax({
                url: url,
                type: "post",
                dataType: "json",
                data: formdata,
                success: function(data) {
                    switch (data.livre) {
    
                    case 'tituloLivre':
                        $("#msgbox2").fadeTo(200, 0.1, function() {
                            $(this).html('error').fadeTo(900, 1);
                        });
                        break;
                        
                    default:
                        $("#msgbox2").fadeTo(200, 0.1, function() {
                            $(this).html('success!').fadeTo(900, 1, function() {
                            	$('#conteudo').load('test.php'); // show NULL and must be programmer
                            });
                        });
                        break;
                    }
                }
            }); 
            return false;         
        }); 
    }
    doAjax('sent.php');
    doAjax('dojo/test.php');   
    });
    </script>


test.php

    <?php
    include ('includesMy.php');
    $form = $_POST['item'];
    $oferta = $form['oferta'];

    var_dump($oferta);
    
    ?>


what is sent:

    item[oferta] programmer



return null in ajax
===

i have this code:

    <script type="text/javascript">
    $(document).ready(function(url) {
    
    function doAjax(url) {
        $("#customForm").submit(function() {
            var formdata = $("#customForm").serializeArray();
            $.ajax({
                url: url,
                type: "post",
                dataType: "json",
                data: formdata,
                success: function(data) {
                    switch (data.livre) {
    
                    case 'tituloLivre':
                        $("#msgbox2").fadeTo(200, 0.1, function() {
                            $(this).html('error').fadeTo(900, 1);
                        });
                        break;
                        
                    default:
                        $("#msgbox2").fadeTo(200, 0.1, function() {
                            $(this).html('success!').fadeTo(900, 1, function() {
                            	$('#conteudo').load('test.php'); // show NULL and must be programmer
                            });
                        });
                        break;
                    }
                }
            }); 
            return false;         
        }); 
    }
    doAjax('sent.php');
    doAjax('dojo/test.php');   
    });
    </script>


test.php

    <?php
    include ('includesMy.php');
    $form = $_POST['item'];
    $oferta = $form['oferta'];

    var_dump($oferta);
    
    ?>


what is sent:

    item[oferta] programmer


