use 'latest' library versions for maximum lifespan as an example
[gae-samples.git] / 24hrsinsf / templates / add_business.html
blob7698b7dc320ca30f0754de9b12e1b77e2ec1a5c6
1 <html>
2 <script src="http://maps.google.com/maps?file=api&amp;v=2&amp;key=ABQIAAAA8BIRg00HxcZfMmKWER2WexQ7LC3C_fx_Q1GpOIvzsAGy10bYSxQFXmk4ZqzwBhTQIoqAotMqipvIMQ" type="text/javascript"></script>
4 <script type="text/javascript">
6 var geocoder = null;
8 function initialize() {
9 geocoder = new GClientGeocoder();
12 function populateBizInfo(form) {
13 if (geocoder) {
14 var loc = geocoder.getLatLng(
15 form.address.value,
16 function(point) {
17 if(!point){
18 alert('Bad Address')
19 return;
20 } else {
21 document.getElementById("lat").value = point.lat();
22 document.getElementById("lon").value = point.lng();
23 form.submit();
29 </script>
30 <body onload="initialize()" onunload="GUnload()">
31 <form action="/add_biz" method="POST">
32 Business Name: <input type="text" name="name"><br />
33 Business Address: <input type="text" name="address"><br />
34 Business Hours:<br />
35 Monday: <input type="text" name="monday_start"> <input type="text" name="monday_end"><br />
36 Tuesday: <input type="text" name="tuesday_start"> <input type="text" name="tuesday_end"><br />
37 Wednesday: <input type="text" name="wednesday_start"> <input type="text" name="wednesday_end"><br />
38 Thursday: <input type="text" name="thursday_start"> <input type="text" name="thursday_end"><br />
39 Friday: <input type="text" name="friday_start"> <input type="text" name="friday_end"><br />
40 Saturday: <input type="text" name="saturday_start"> <input type="text" name="saturday_end"><br />
41 Sunday: <input type="text" name="sunday_start"> <input type="text" name="sunday_end"><br />
42 Description: <input type="text" name="description">
43 Tag: <input type="text" name="tags">
44 <input type="hidden" id="lat" name="lat">
45 <input type="hidden" id="lon" name="lon">
46 <input type="button" value="Add Business" onclick="populateBizInfo(this.form)">
47 </form>
48 </body>
49 </html>