jquery - Why are my POST variables showing up on URL string? -


i've implemented ajax post function based on button click. code is

$.ajax({     type: "post",     url: "includes/phpscripts?action=manage",     data: {location: loc, lat: latitude, lon: longitude, heading: head, filename: file},     success: function(){       $("#panoinfo").html("<div id='message'></div>");       $("#message").html("valid submission");   } }); 

i specified post method since don't want variables visible via url. however, are.

my test url before posting

http://localhost/jmctour/buildtour.php 

afterwards

http://localhost/jmctour/buildtour.php?filename=1-prefix_blended_fused.jpg&location=start+of+tour&lat=43.682211&long=-70.450705&heading=100&submit=save 

why?

from docs jquery.ajax (emphasis mine):

data

data sent server. converted query string, if not string. it's appended url get-requests. see processdata option prevent automatic processing. object must key/value pairs. if value array, jquery serializes multiple values same key based on value of traditional setting (described below).

and therefore:

processdataboolean

default: true

by default, data passed in data option object (technically, other string) processed , transformed query string, fitting default content-type "application/x-www-form-urlencoded". if want send domdocument, or other non-processed data, set option false.


Comments

Popular posts from this blog

django - How can I change user group without delete record -

java - Need to add SOAP security token -

java - EclipseLink JPA Object is not a known entity type -