Re: Question about "Rasmus' 30 second AJAX Tutorial"
| From: | xfedex | Date: | Fri, 30 Sep 2005 15:26:13 +0000 |
| Subject: | Re: Question about "Rasmus' 30 second AJAX Tutorial" | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-223471@lists.php.net to get a copy of this message | ||
On 9/30/05, Jochem Maas <jochem@iamjochem.com> wrote:
>
> I'm guessing that trhe onclick and onsumbit handlers you set are hanging
> on a 'submit' type input? .. if so the form is submitting - in whcih case
> the
> AJAX request will arrive back at your page - and the page won't be there
> (so
> to speak). try changing your onsubmit to something like:
>
>
> <input type="submit" value="submit" onclick="myAjaxFunction();
> return
> false;"/>
>
> the return false tells the browser block form submission.. the same
> technique
> is used to validate forms and stop submission in case of errors (in such
> cases
> the boolean return is conditional e.g.:
>
> <input type="submit" value="submit" onsubmit="return
> myValidationFunction();"/>
>
> >
> > Sorry about my english (I'm from the third world ;) )
>
> whatever happened to the 'second world'? and since
> when is it a competition? ;-)
Ok, its working now...
<input type="submit" value="submit" onclick="myAjaxFunction(); return
false;"/>
There was the form submision that was making troubles.
Thank you all!!
Regards,
Fede.