views:

110

answers:

1

hi. i want to refresh the parent site when i close my jquery dialog. i look at the jquery site and the close event but i am not sure if i get it. so i would appriciate a litle help on the way.

from what i figure sofar i have to do like this. this is my code for the dialog i use.

$("#dialog").dialog({ height: 700, width: 600, closeOnEscape: true, title: 'View', close: function(event, ui) }).dialog("open");

now what i dont get is the close function there, should it be there in the first place? what goes on the event and ui(the close function is straight from the jquery site)?

where should i go from here?

thanks for any help i could get on this.

A: 
$("#dialog").dialog({ height: 700, width: 600, closeOnEscape: true, title: 'View', 
   close: function(event, ui){ doThings(); }}).dialog("open");

What you need to do is to either use a defined function or define it on the fly.

marcgg
oh i missed that { doThings(); }.. the ui text in the function, what is that for?
Dejan.S
This would be your callback function. I called it doThings but call it whatever and define it somewhere to get it to do what you want.
marcgg
ok thanks for that.. now i need to figure out how to refresh the parent site on the close. if you got any suggestions i am more then thankful for any help i get..
Dejan.S
what do you mean by parent site? This would be another question I guess
marcgg
yea i will make another post about this.. thanks for the help marcgg
Dejan.S
you're welcome, have fun. I think there are already questions about this on SO somewhere, make sure you search before re-posting
marcgg