[OpenLayers-Users] Problem to send kml file to server,
using OpenLayers.Request.POST
Vidal, Antoni
antoni.vidal at icc.cat
Tue Jul 7 06:17:32 EDT 2009
Hello,
I read the documentation of use of requesting remote data, and I've followed the examples but I'm not able to send data from an input file field form to a php, and then get the response.
My goal is let the user to upload a kml file from a form in a OL client, and then read the file and render it in the same OL.
My code:
function ImportVectorData(){
//document.importkmlform.submit(); THIS WORKS
var request = OpenLayers.Request.POST({
url: "/php/putKML.php",
data: document.importkmlform.datafile.value,
headers: {
"Content-Type": "multipart/form-data"
},
callback: handler
})
}
Any help will be appreciate.
Thank's in advance.
Antoni Vidal
Unitat d'Aplicacions SIG-WEB
Institut Cartogràfic de Catalunya <http://mercuri.icc.cat/website/mob_nf/mob1/mob2/inici2.htm?CONSULTA=Institut%20Cartogr%25E0fic%20de%20Catalunya&XYADDRESS=429486:4580392>
Parc de Montjuïc, E-08038 Barcelona
Tel. (+34) 93 567 15 00 (ext. 3228)
www.icc.cat <http://www.icc.cat/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090707/21d4ef0e/attachment.html
More information about the Users
mailing list