Hi Evan,

Sure, just use an <input type="button" onclick="whaeverjavascript();"
/> instead of <input type="submit" ... />.

Also, don't use <form>..</form> tags around your form, that way, when
the user presses enter while inside any of the controls, nothing get's
submitted.

Also, have a look at the functions "formContent" (in the DOM module)
and "queryString" (in the Base module) in Mochikit. That way, if you
have your form elements inside a div with id="formdiv", you can do
this:

var formvalues = formContent($('formdiv'));
var qs = queryString(formvalues[0], formvalues[1]);
var deferred = loadJSONDoc('yourjsonreturningview?' + qs);
deferred.addCallback(function (result) { /* do whatever with the result */ }

Arnar

2005/12/9, evan <[EMAIL PROTECTED]>:
>
> I'd like to have a form end up invoking a method that passes back its
> results in JSON but I don't know how to do this.  Is there a way to
> accomplish this?
> Thanks in advance,
> Evan
>
>

Reply via email to