By pcbos on
I'm using Nodereference_url and Modal Frame API to open a modal frame to write a review on a product. The product is the parent, the review the child page.
After the review is added in the modal frame, I want the modal frame to be closed after submitting and I want the parent (product) page to be reloaded to show that a new review is added. If I don't use the modalframe_close_dialog, the parent is opened in the modal frame. If I do use modalframe_close_dialog(array()), the modal frame is closed. But I want the parent page to be reloaded and I would like that page to show the message that the review is added.
Anyone knows how to do this?
Comments
Call OnSubmit
I've added the following to the hook_form_alter:
Then I've added a new function:
I would like to know what I can put in the array to call the OnSubmit element of the API.
Still nobody that has the answer?
Any solution for this problem
any possible solutions please
i have the same problem
can any one help me to do this please.
Call
Call
window.location.reload();in your onSubmit event handlerEDIT: adding example
This will reload the page
This will reload the page even if closing the modal box without any submits.. any other thoughts?
If it is in the Submit event
If it is in the Submit event handler, it should only refresh on submit.
Unfortunately, this doesnt
Unfortunately, this doesnt quite work, as the Modalframe API defines any close event as "onSubmit", not just the submit action.
xtfer.com
platform.sh
Issue with status message
Thank you, very much for the above information. This has worked for me.
In my requirement, the parent page is a list containing two columns name and address, and a link "Add new".
On clicking the "Add new" link, a modal frame is opening up and on submitting the modal frame, the parent page is getting refreshed with updated information. (I am really thankful to you for achieving this.).
After this a status message is getting displayed on the parent page and it disappears once the parent page gets reloaded. (It is quite obvious.).
But,my requirement is to display a status message on the parent page after it gets reloaded.
Any or all guidance/suggestion/help is greatly honoured.
Thanking You,
Pradeep
subscribe
subscribe