Reload parent shadowbox iframe page without losing POST data

I have a page where users can edit pictures from a list with filters via POST. When a user edits something it opens in a shadowbox window. Then on submit the parent page reload with this code:

<script type="text/javascript">
noty({"text":"<?php if (isset($_GET["id"])){ echo "Foto modificada con éxito!"; }else{ echo "Foto creada con éxito!"; } ?>","layout":"center","type":"success","animateOpen":{"height":"toggle"},"animateClose":{"height":"toggle"},"speed":500,"timeout":5000,"closeButton":false,"closeOnSelfClick":true,"closeOnSelfOver":false, onClose:cerrar});
function cerrar(){
    window.parent.open('index.php?sec=galerias_de_fotos', '_self');
}
</script>

The problem is that when i reload the parent page i lost the POST values so the filter is lost. I need that the parent page refresh after closing the shadowbox without loosing the filter.

I also tried:

function cerrar(){
  parent.location.reload();
  parent.Shadowbox.close();
}

that works in reloading but not in maintaining POST values. The rare thing is that if i reload with F5 the POST values maintain but not this way.

Answers


A solution is to save the post value in session.


Need Your Help

Allocating on heap vs allocating on stack in recursive functions

c++ c recursion memory-management embedded

When I'm defining a recursive function, is it better/safer to allocate local variables on heap, and then clean them up before the function returns, than to allocate them on stack. The stack size on

PHP Loop through Multidimensional to Onedimentional Array

javascript php arrays loops multidimensional-array

I have some javascript that, through ajax, passes some content to a PHP controller. What it passes is a multidimentional array, for example: