Hey,
My basic usage of this module is something like:
1) You're on a view which outputs lists of node type X
2) There's a button to add a new X
3) Clicking the button opens up the node form in a modal
4) You fill out the form and submit it
After submitting the form sucessfully and having the modal close, it would be great if the body content automatically updated based on the changes (like displaying my new node without having to refresh the page).
Popups API did this automatically. You just had to specify the div ID that wrapped the $content.
Is there any easy way to do this?
Thanks
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | ajax-loader.gif | 8.04 KB | mstef |
Comments
Comment #1
mstef commentedI figured out how to do this, although it's quite complicated.
If anyone is interested..let me know
Comment #2
markus_petrux commentedThe Modal Frame Contrib Package contains a few modules that could be used as an example to refresh content on the parent page after the child form has been submitted and processed.
Anyway, it would also be nice if you could describe what you did in your case, which is related to Views, and nothing in the above mentioned package does it.
Comment #3
mstef commentedWhich modules - because I didn't see one of them doing so. Most of them submit forms that only change things behind the scenes - unless I was missing something.
It's not exactly related to views - it will just reload the entire body via ajax after a submission. I'll paste it in here in a few..
Comment #4
markus_petrux commentedSee for example the
updateElement()in the modalframe_cck_manage_fields module. The same technique is used by the modalframe_input_formats module. Both modules modify the DOM dynamically as a result of the operation performed with the child form.Maybe this kind of tricks can help others than may find this issue from the search pages.
Comment #5
mstef commentedOh I see.. I don't think I have a choice but to update the entire page because most these forms can change any number of elements on the page. Will post the solution once I fine-tune it.
Comment #6
mstef commented.js
.module
.css
Attached is the overlay image (taken from popups.module)
Comment #8
broncomania commentedThx mikesteff for posting your .js file. This helps me a lot !!!