Pedro Algarvio, aka, s0undt3ch wrote:
> The correct javascript I have is:
> new Form.Observer('sortby', function(element, value) {
>     new Ajax.Updater('UsersList',
>         '/mail/userlist',
>         {
>             asynchronous:true,
>             evalScripts:true,
>             onLoaded:function(request){$('spinner').innerHTML = '';},
>             onLoading:function(request){$('spinner').innerHTML = '<img
> src="/images/loading.gif">';},
>             parameters:Form.serialize($$('sortby'))
>         }
>     )}
> )
>
> The one above what just a trial out...

Ok, to post the solution to the group:
The above javascript is badly written because it lacks the frequency
argument. So the correct javascript would be:
new Form.Observer('sortby', 1, function(element, value) {
    new Ajax.Updater('UsersList',
        '/mail/userlist',
        {
            asynchronous:true,
            evalScripts:true,
            onLoaded:function(request){$('spinner').innerHTML = '';},
            onLoading:function(request){$('spinner').innerHTML = '<img
src="/images/loading.gif">';},
            parameters:Form.serialize($$('sortby'))
        }
    )}
)

Plus, the javascript must be defined/called after the form is present
in the web page, else errors will show up in the javascript console and
it will not work.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss
-~----------~----~----~----~------~----~------~--~---

Reply via email to