[jQuery] [autocomplete] send a json object?

2009-02-08 Thread arnoldroa

Hi, i need to send a json object to the autocompleter. i see this
example on the demo:

$(#thickboxEmail).autocomplete(emails, {
minChars: 0,
width: 310,
matchContains: true,
highlightItem: false,
formatItem: function(row, i, max, term) {
return row.name.replace(new RegExp(( + term + ), 
gi),
strong$1/strong) + brspan style='font-size: 80%;'Email:
lt; + row.to + gt;/span;
},
formatResult: function(row) {
return row.to;
}
});

the emails object var is a object, so

emails = {name: 'aasdfasd', to: 'asdfqweqwe'}

i need just that, the problem is that my mail is on a mysql DB. i dont
want to send a one item per line. i want to send a json object. is
there anyway?


[jQuery] Re: Problem with submitHandler

2009-01-19 Thread arnoldroa

anyone? im using form.submit inside submitHanldler but firebug said
that submit is not a function. if i do $(form).submit() i get inside a
infinite loop.

On 16 ene, 16:00, arnoldroa mano...@gmail.com wrote:
 i have this:

        submitHandler: function(form) {
                 if( jQuery(#productList .productRow).size()  0 ){
                         if( confirm(¿Are you sure?) ) {
                                 form.submit();
                         }
                         else{ return false; }
                 }else{
                         alert(Debe ingresar por lo menos un producto);
                         return false;
                 }
         }

 but that gives me the next error on firefox: form.submit is not a
 function. Any ideas?


[jQuery] [validate] Problem with submitHandler

2009-01-16 Thread arnoldroa

i have this:


submitHandler: function(form) {
if( jQuery(#productList .productRow).size()  0 ){
if( confirm(¿Are you sure?) ) {
form.submit();
}
else{ return false; }
}else{
alert(Debe ingresar por lo menos un producto);
return false;
}
}

but that gives me the next error on firefox: form.submit is not a
function. Any ideas?