I have a webpage where a user can 'add an article'; when they click to 'add an article' it opens an iframe (a pop-up modal box).
In the Iframe there is a form with 'save' and 'cancel' buttons - what I'm trying to do is make it so when the user hits 'save', it will save the data to the database, and then refresh the page.
Currently when the user hits "Save" it saves the data, but the page remains open. The only way of knowing it saved is that the text "Add Item" changes to "Edit Item".
The component that handles this whole process is listed here
The 'form' code that is what the users see and fill out is listed here: http://code.google.com/p/joomlaworks/source/browse/trunk/K2/components/com_k2/views/item/tmpl/form.php?r=604
I know very little about javascript, and only moderate knowledge of php. When the user hit's 'save', postback is generated - I just don't know how to tell from where. I'm thinking if I could put the following code into the postback it would do what I want:
window.parent.location.reload();
If anyone can help me to figure out where the postback is being generated from, and how I put that code in there it would be greatly appreciated!