Thank you...
It works exactly as you said.
AjaxGrid alredy create <div id='(id)_update'></div>. I just replace
my swapDOM for another DIV with same id. I just changed one thing from
the original example I sent. I'm not rewriting AjaxGrid.refresh method
on JavaScript anymore ... now I'm using sawpDOM directly on template
on_click from my reimlpementation of AjaxGrid, right before the
original refresh call.
<code>
onclick='javascript:swapDOM(\"${id}_update\",
DIV({id:\"${id}_update\"},SPAN(null, BR(null),
\"Loading...\")));${id}_AjaxGrid.refresh(${defaults});return false;'
</code>
Less intrusive, much better IMHO.
Regards....
On 1/10/07, Jorge Godoy <[EMAIL PROTECTED]> wrote:
>
[cut]
> Exactly what I said. You're not creating your place holder back. Imagine
> this:
>
> - You have an id 'my_message'
> - You put your message inside 'my_message'
> - You swap <span id='my_message' /> with <span />
> - WHERE do you put your message next time?
>
> You have to create your elements with what you're using to find them, either
> their name, an attribute, a class or preferably an id... If you can't find
> them on the DOM tree then you can't replace the right thing.
--
- Ulysses Almeida
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TurboGears" 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/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---