views:

55

answers:

3
A: 

Change it as follows:

url: "http://www.cherrytrees.nl/tmp/process.php?" + data,

In your original request you were sending it via POST, rather than GET.

xil3
its sending via GET... `type: "GET"`
RobertPitt
i've just tested same ajax request - it works for me. so that's not the problem.
Denis
That change in the url doesn't work either..
Maurice
A: 
 url: "http://www.cherrytrees.nl/tmp/process.php", 
       type: "GET",    
       data: data,  

the option "data" ist only for POST type, if you wont to GET paratmeeters, write them in your URL

url.com?name="+$("#name").val()+"&gende....
Fincha
read my comment to xil3 post. I think Nick Craver posted right asnwer in OP post's comments.
Denis
+1  A: 

maybe this will help:

   success: function(result){
    $("#content").html(result);
   }

In your code you are sending 2 ajax request. First with $.ajax and with some GET parameters, and second with $().load, but without any parameters. So actually you can simplify your code to this:

if(form == true){
   var gender = $("input[@name='rgender']:checked").val();
   var data = "name="+$("#name").val()+"&gender="+gender+"&country="+$("#country").val()+"&address="+$("#address").val()+"&zip="+$("#zip").val()+"&city="+$("#city").val()+"&mail="+$("#mail").val()+"&phone="+$("#phone").val()+"&checkin="+$("#checkin").val()+"&guests="+$("#guests").val()+"&time="+$("#time").val()+"&nights="+$("#nights").val()+"&remarks="+$("#remarks").val();
   $("#content").load('http://www.cherrytrees.nl/tmp/process.php', data);
   f.preventDefault();
}
Denis
I don't think that is the problem, because i get the following output: <em>GET:<em> Just as it is empty
Maurice
it is the problem :) i've edited my post with some explanation
Denis
Hmm.. i tried your solution, but i'm still getting empty values..process.php loads, but there is no data in it
Maurice
oh sorry, i made a mistake in first code snippet. there should be $("#content").html(result);. try changing your success: function to the one i've posted.
Denis
Ok, maybe i'm retarded but those two options both don't work here :( The second one actually sends my form (so preventDefault) somehow don't work and the first one still gives me no data (allthough process.php loads)
Maurice
try alert($("#name").val()); are you sure it's not empty?
Denis
I'm sorry, IT WORKS!! You're my hero!! I still used the GET method, but i changed it to POST en everything is allright! Thanks!
Maurice
that's strange it didnt work with GET
Denis