Skip to content Skip to sidebar Skip to footer

Passing Variable From Fancybox To Parent Page When Closing Fancybox

Hi im trying to send a variable from a child iframe fancybox to the parent. But i cant seem to grasp how to do it. Does anyone have a idea. I already tried with js. A friend sugges

Solution 1:

I will try two solution, i don't know if in your case can works but are pretty solid.

1) sessionstorage:

using sessionstorage with jquery you can save a parameter and use it later in any page.

sessionStorage.setItem("nameofthestorage", yourvalue);

and to take the saved info

var x = sessionStorage.getItem("nameofthestorage");

2)save a php session:

i'm a bit rusted with php but you can see this official and easy guide http://www.w3schools.com/php/php_sessions.asp

Post a Comment for "Passing Variable From Fancybox To Parent Page When Closing Fancybox"