The target is missing
success: function() { web2py_component('../groupUsers/{{=groupId}}',
'target'); },
where 'target' must be the id (in quotes) of the component to be
refreshed.
On Jun 16, 1:13 pm, Jim Steil <[email protected]> wrote:
> Massimo
>
> Thanks for the reply. I made the change you recommended. I can see
> that the function is called using firebug, but the component doesn't
> refresh. Would it have something to do with this running inside the
> component?
>
> -Jim
>
> On 6/16/2011 12:37 PM, Massimo Di Pierro wrote:
>
>
>
>
>
>
>
> > Try replace
>
> > success: web2py_component('../groupUsers/{{=groupId}}'),
>
> > with
>
> > success: function() { web2py_component('../groupUsers/
> > {{=groupId}}'); },
>
> > On Jun 16, 12:02 pm, Jim Steil<[email protected]> wrote:
> >> Hi
>
> >> I have a component on my page that displays the auth_users that have
> >> membership the specific auth_group. I have some the following js to
> >> remove someone from a group:
>
> >> function deleteMembership(userId, groupId) {
> >> $.ajax({
> >> type: "POST",
> >> url:'../groupUserDelete',
> >> data:'userId=' + userId + '&groupId=' + groupId,
> >> success: web2py_component('../groupUsers/{{=groupId}}'),
> >> });
> >> }
>
> >> it is working except for my 'success' case. I'm trying to reload just
> >> the component and not the entire page. I've verified the rest of this
> >> works by specifying location.reload() in the success case and that
> >> successfully reloads then entire page. I'm trying to just reload the
> >> component. This javascript is in the .load file for the component. Any
> >> clues as to what I'm doing incorrectly?
>
> >> -Jim