If you're asking how to have a form that calls a javascript function
when submitted but does not actually submit itself to the server and
cause a page refresh then this is the method i use:

<form action="" id="myFormId" onsubmit="myFunction(); return false;">

// your form inputs etc go here

<input type="submit" value="Go" />
</form>

The important thing is that the javascript which executes in the
'onsubmit' event must return FALSE otherwise the form will submit
itself to the server.

Watch out for errors in myFunction() - any errors will be returned
from the function to the form and evaluated to not FALSE and the form
will submit, but as long as your myFunction() function is error free
then the above code will work as you require.

Martin.


On 27 Aug, 03:35, andrewliu <ahl...@gmail.com> wrote:
> Okay, after playing around it some more. I think I know what the
> problem is.
>
> my search form refreshes the page when it tries to search through my
> database. So it refreshes the google map as well. How do I go about
> this since I'm pretty new at programming stuff?
>
> Thanks
>
> On Aug 24, 9:27 am, Rossko <ros...@culzean.clara.co.uk> wrote:
>
> > > My main search engine location box is the only one that has the id =
> > > addressInput.
>
> > Then we're thrown back on "something is wrong" and I have no further
> > guesses for you.  You may have to let people see the patient.

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

Reply via email to