On a related note:
What is the best way to trigger a Javascript function upon a jDiv load
or form submit within a jDiv? For example:
I have a list of customers shown in jDiv1. User clicks a link for a
given customer and I load customer's update form in jDiv2 (which I
also make visible at that point). When user submits form, I hide
jDiv2, reload jDiv1.
Having the customer link call a Javascript function to show jDiv2 and
call jDivLoad manually with the appropriate callback for the given
customerID works fine. I'm not sure of the best way to have jDiv2's
submit success result in another Javascript function call, where I
reload jDiv1 and hide jDiv2?
I note in the example, that jDiv.set(jDiv.trigger('#target_1','load'))
is used to force a refresh of another div after submitting a form. Can
this mechanism be used instead to call a javascript function? Ideally,
I wouldn't want one jDiv to have to know about the other, I would
prefer to keep my partials loosely coupled and bind their behavior
with one another together through javascript on the client side in
order to facilitate better re-use of those partials.
On May 1, 1:38 pm, Wes James <[email protected]> wrote:
> ceej is also working on an update to jdiv to be out in a few weeks maybe.
> (if he get's time to work on it.) Maybe he can look at this while doing his
> update :)
>
> -wj
>
> On Fri, May 1, 2009 at 2:13 PM, mdipierro <[email protected]> wrote:
>
> > This may a bug in JS library used to handle jDiv. I will investigate
> > but it will not be solved overnight.
>
> > Massimo
>
> > On May 1, 2:21 pm, Ted G <[email protected]> wrote:
> > > I've been trying out the new jDiv container, which works well with the
> > > exception of forms containing upload fields. I thought I would start a
> > > new thread for this, as my previous post (included below), seemed out
> > > of place in the old thread.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"web2py Web Framework" 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/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---