You can do an ajax call using a jQuery ajax method, such as $.get:
http://docs.jquery.com/Ajax/jQuery.get#urldatacallbacktype

If you want something to occur at the return of that ajax call, specify a
callback function as the final argument.

- Richard

On Thu, Aug 27, 2009 at 5:33 AM, Ties <[email protected]> wrote:

>
> Im fairly new with using jQuery. I setted up a demo modal window that
> parses a ajax call. At the return of the ajax call a javascript
> function can be called. Here is a short demo:
>
> $(function() {
> tips = $("#validateTips");
>                function updateTips(t) {
>                        tips.text(t).effect("highlight",{},1500);
>                }
> function popper1() { alert('y'); }
> $("#dialog_login").dialog({
>                        bgiframe: true,
>                        autoOpen: false,
>                        height: 100,
>                        modal: true,
>                        buttons: {
>                                'Login': function() {
>                                        ajaxObj.call('action=login' +
> ajaxObj.getForm('login'),
> ajx_fill);
>                                        $(this).dialog('close');
>
>                                },
>                                'Annuleren': function() {
>                                        ajaxObj.call('action=login' +
> ajaxObj.getForm('login'),
> ajx_fill);
>                                        // $(this).dialog('close');
>                                }
>                        },
>                        close: function() {
>
>  allFields.val('').removeClass('ui-state-error');
>                        },
> plopper2: function() {
> alert('x');
> }
>                        });
>                $('#login_button').click(function() {
>                        $('#dialog_login').dialog('open');
>                })
>        });
>
> in the return i can use: $('#dialog_login').dialog('close') but i want
> to call a custom function like the plopper1 or plopper2 function.
>
> I would also like to be able to use a custom function in a onChange
> statement in my form.
>
> Anybody?
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"jQuery UI" 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/jquery-ui?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to