I am working on a Google Map api3, I am adding points on the map and save it to my database this part is working fine now in the end of adding the map and click on save and close I need to redirect to another page which will tell the user thanks you have finished and everything is OK

this is the part responsible for my requirement on Google Map Java script

var url = "manageMap.php?propid=<?php echo $p; ?>&name=" + name + "&address=" + address +
                "&type=" + type + "&lat=" + latlng.lat() + "&lng=" + latlng.lng();
      downloadUrl(url, function(data, responseCode) {
        if (responseCode == 200 && data.length <= 1) {
          infowindow.close();
          document.getElementById("message").innerHTML = "Location added.";
        }
      });
    }

how I can edit this part to redirect the page after I finish to "Thanks everything is saved and you are finished"

any way to change this line document.getElementById("message").innerHTML = "Location added."; to redirect to another page

you can redirect a page using

window.location.href="http://www.google.com";

on what event do you want to redirect the page??

when the client click on save and close document.getElementById("message").innerHTML = "Location added.";

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.