views:

46

answers:

1

Hello,

I'm trying to reload a div on a main page when I edit the dynamic content in a fancybox. The main page is made of an included php files. I thought I would be able to reload it.

I used the .load() function on the 'onClosed' element in the fancy box:

$(".add_form").fancybox({ 'type' : 'iframe', 'onClosed': function() { $('.param_middle_down').load('admin_inc_param_call_fav.php'); } });

I would just like to be able to put it this way: $('.param_middle_down').load('admin_inc_param_call_fav.php?id=$i'); where $i would be a variable sent when opening the fancybox. I don't know if there is anychance to call the fancybox with a variable?

A: 

try this $('.param_middle_down').load('admin_inc_param_call_fav.php?id=<php echo $i; >'); provided it must be a php file not js file

Deepak