Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Storing gps coordinates from google maps into vfp table
Message
De
20/12/2015 15:22:58
 
 
À
20/12/2015 11:17:13
Information générale
Forum:
Visual FoxPro
Catégorie:
Produits tierce partie
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 10
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01629101
Message ID:
01629162
Vues:
144
thx, easy solution if the used browser supports activeX.
Interesting that sandbox could be that easy to circumvent - on which browsers did you test?
Not even a warning that the process was trying to put some files on the machine?

>Here is solution.
>
>somewhere in BODY section I put listener to read gps coordinates on right click
>
>google.maps.event.addListener(map, "rightclick", function(event)
>{
> var lat = event.latLng.lat();
> var lng = event.latLng.lng();
> // populate yor box/field with lat, lng mayby some other fieds you need for location, perhaps create marker
>
> var StoreToFile= "lat"+lat+"#"+"long"+lng
>
> WriteToFile(StoreToFile)
>}
>);
>
>At the end of SCRIPT section
>
>function WriteToFile(sText)
>{
>var fso = new ActiveXObject("Scripting.FileSystemObject");
>var FileObject = fso.OpenTextFile("C:\\tmp\\LogFile.txt", 8, true,0); // 8=append, true=create if not exist, 0 = ASCII
>FileObject.writeline(sText)
>FileObject.close()
>}
>
>
>Voila, now I can manipulate with data in my logfile.txt
>
>Thanks for all replies.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform