JavaScript on Form Action

I have a form that works when the form action is set to

form action="login/login.php"

That works find it displays the error if the details are missing/incorrect and displays the correct page if the correct details are used.

But as soon as I change it to this

form action="javascript:ajaxpage('login/login.php', 'mainarea');"

It don't work fully it only displays the first error message it hits.

Notes:
mainarea is a container that holds all the data, the site is AJAX but this seems to be a JavaScript error.
[604 byte] By [pjb007] at [2007-11-19 22:15:20]
# 1 Re: JavaScript on Form Action
Copied to AJAX ... I'm not sure exactly how to resolve this.
Dr. Script at 2007-11-10 3:59:03 >
# 2 Re: JavaScript on Form Action
If it is firing a JavaScript error, then the PHP page probably calls some JavaScript based on results. You should double check that. You can also post the PHP source to help with some clarification.
PeejAvery at 2007-11-10 4:00:03 >