Announcement

Collapse
No announcement yet.

call form app from Jsquery !!! need help

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • call form app from Jsquery !!! need help

    Hello,

    I have this in my blank application, :

    echo "<!doctype html>
    <html lang='en'>
    <head>
    ...
    ...
    ...

    function init() {
    $('#makeMeEmpty').dblclick(function(){

    var idlist = $(this).attr('id');alert(idlist);
    $.ajax({
    url: '../blank_reser/blank_reser.php',
    type: 'POST',
    data: { field1: 'hello1', field2 : 'hello2'} ,
    success: function (response) {
    alert(response.status);
    },
    error: function () {
    alert('error');
    }
    });
    });
    }

    ...
    ...
    </html>";


    In blanc_reser.php :

    if (!empty($_POST['field1']))
    {
    echo $_POST['field1'];
    }

    if (!empty($_POST['field2']))
    {
    echo $_POST['field2'];
    }


    I receive "undefined" in pop-up ??? I am not sure blank_reser.php was execute and I cannot find what the message means .

    Somebody an idea ???

    Thanks in advance
    Nac

  • #2
    Hello,

    Finally, I found a working solution !!!

    Replace with :

    function init() {
    $('#makeMeEmpty').dblclick(function(){

    var idlist = $(this).attr('id');alert(idlist);
    window.open('../blank_reser/blank_reser.php', '_self');
    });
    }


    For parameters, using cookies or session variables


    Nac

    Comment

    Working...
    X