0

I'am using tideSdk to create application using php and jquery this is my code Jquery:

$(function(){
        $('.button').on('click',function(){
    Var name = $('.nameF').val();
    $.post('index.php',{create:"",name:name},function(e){
    Alert(e);
    })
    })})

php (index.php):

<?php
If (filter_has_var(INPUT_POST,'create')){
Echo $_POST['name'];
Exit();

}

?>

Html:

<input type="text" class="nameF"><input type="button" value="save" class="button">

The return value is html code not the name i posted, when i use internet browser its working perfectly, but in tidesdk is alerting html code

1 Answers1

0

In TideSDK the method for request in ajax is alway GET

.post not is possible

.GET Ok

for the forms the method is automatical GET, not POST

example:

<form action="miphpfile.php" name="mi_form">
</form>

this form is with GET method automatical

Sam
  • 1