Hi all, I need your help to save 2 variables within javascript to a text file , this should work on firefox I will not use IE, the following is the code, I put a remarks where I want the saving code to be .

<script src="http://maps.google.com/maps/api/js?sensor=true">
<script type="text/javascript">
if (navigator.geolocation) {
var latitude = position.coords.latitude;
var longitude = position.coords.longitude;
var coords = new google.maps.LatLng(latitude, longitude);
var mapOptions = {
zoom: 22,
center: coords,
mapTypeControl: true,
navigationControlOptions: {
style: google.maps.NavigationControlStyle.SMALL
mapTypeId: google.maps.MapTypeId.SATELLITE
map = new google.maps.Map(
document.getElementById("mapContainer"), mapOptions
var marker = new google.maps.Marker({
position: coords,
map: map,
title: "Test Project ["+latitude+"] - ["+longitude+"]"
The variables to be saved : latitude and longitude
The text file name : temp.txt

}else {
alert("Geolocation API is not supported in your browser.");

<style type="text/css">
#mapContainer {
height: 600px;
width: 900px;
border:10px solid #eaeaea;

<div id="mapContainer">&nbsp;</div>

thank you very much