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/>
_______________________________________________
Users mailing list
[email protected]
http://openlayers.org/mailman/listinfo/users