Hi,

This seems like it's probably some kind of client side coding issue that is
causing things not to execute properly.  self.request.get('place') is the
proper syntax in this case, so that is not the issue.

FWIW, this is they way I construct my javascript + HTML forms when needing
to do something similar, calling form.submit() from the javascript function
(it uses the maps geocoder, but the principle should be the same):

<script>
function populateInfo(form) {
  if (geocoder) {
    var loc = geocoder.getLatLng(
      form.address.value,
      function(point) {
        if(!point){
            alert('Bad Address')
            return;
        } else {
            document.getElementById("lat").value = point.lat();
            document.getElementById("lon").value = point.lng();
            form.submit();
        }
      }
    );
  }
}
</script>
<form action="/add_biz" method="POST">
  Business Name: <input type="text" name="name"><br />
  Business Address: <input type="text" name="address"><br />
  Description: <input type="text" name="description">
  Tag: <input type="text" name="tags">
  <input type="hidden" id="lat" name="lat">
  <input type="hidden" id="lon" name="lon">
  <input type="button" value="Add Business"
onclick="populateInfo(this.form)">
</form>

On Mon, Jan 5, 2009 at 10:45 AM, Stephen Judd <judd.step...@gmail.com>wrote:

> What sort of error?
>
>
> On Mon, Jan 5, 2009 at 1:36 PM, thebrianschott <schott.br...@gmail.com>wrote:
>
>>
>> Steve,
>>
>> Your syntax throws a python syntax error for me.
>>
>> In the meanwhile I have discovered the GAE documentation for
>> self.request.get() at the following link.
>>
>> http://code.google.com/appengine/docs/webapp/requesthandlers.html
>>
>> I am now struggling to make the def(post) part of the code to be
>> executed. For some reason, it is not executing at all.
>>
>> Thanks
>>
>> On Jan 5, 12:35 pm, "Stephen Judd" <judd.step...@gmail.com> wrote:
>> > How about replacing: template_values = dict(place=g_place) with
>> >
>> > template_values = {'place': g_place}
>> >
>> > Steve
>> >
>> > On Mon, Jan 5, 2009 at 11:51 AM, thebrianschott <schott.br...@gmail.com
>> >wrote:
>> >
>> > > template_values = dict(place=g_place)
>>
>>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to