On Monday, March 23, 2015 at 1:43:26 PM UTC-7, Garry Smith wrote:
>
> Hi,
> I have had a look at LOAD and Ajax and tested, which I think could work,
> the only thinkgI can't get right is to get the data back into the div I
> want.
> I tried the following {{=LOAD('default','post.load',target='comments',
> ajax=True)}} thinking that the data would be put into the target div
> specified, with target = 'comments'. When I looked in the source of the
> page it shows the following:-
>
> div data-w2p_remote="/music_server/default/post.load/comments" id="
> c559498745475">loading...</div>div id = 'comments'></div>
> As you see it makes a new div called comments ,but does not put the data
> in the original div called comments, is their a way of doing this.
>
>
That doesn't happen with the code I use , which I referred to in your other
thread. But I use "c=" and "f=" explicitly, rather than positional
arguments. I don't know if that is the source of the confusion or not,
since the embedded URL looks like it took c=default, f=post.load; I don't
see another difference there. FF's Inspect Element shows things too
briefly to get all the divs expanded, but Show Source fives a static
snapshot view, and I see my target DIV with the id I specify, and within
that a div data-w2p_remote with the *same* ID and the "loading" message.
/dps
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.