I believe that best practice is

<form onsubmit="checkGoogleAddress();return false" action="#">
   <input type='text' id='address' size='30'>
   <input type='Submit' value='Add event'>
</form>

Without "return false" the form calls your function, and then performs 
the "action" of the <form>. If you don't specify an "action" for the 
<form>, then the default is to reload the page.

Using <form onsubmit> instead of onclick also catches the situation 
where the user enters data into the text box and hits return, rather 
than clicking the actual submit button.

The  action="#"  bit is simply there so that you don't get a validation 
warning.

-- 
http://econym.org.uk/gmap
The Blackpool Community Church Javascript Team


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Maps API" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/Google-Maps-API?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to