Refresh Page openeing Modalbox on ModalBox.hide

12 views
Skip to first unread message

Greg

unread,
May 24, 2008, 5:45:24 AM5/24/08
to ModalBox
I would like to refresh the page that called the modalbox when I close
the modalbox is this possible?

Justinas Urbanavicius

unread,
May 24, 2008, 8:53:37 AM5/24/08
to moda...@googlegroups.com
everything is possible.
onHide event execute parent.location.reload();

Francesco

unread,
May 25, 2008, 6:33:05 AM5/25/08
to ModalBox
<script type="text/javascript">
function refreshPage()
{
parent.location.reload();
}
</script>
....
<a href="#" class="demo-btn" title="Button"
onclick="Modalbox.show(node, {title: this.title, width: 300, onHide:
refreshPage}); return false;">Click me</a>
....

This could be the Justinas Urbanavicius' solution proposed but with 4
or 5 code lines more!
;-)
Enjoy this beautiful script!

Justinas Urbanavicius

unread,
May 25, 2008, 1:53:39 PM5/25/08
to moda...@googlegroups.com
not sure why do you need to declare a function for one line of the code


a href="#" class="demo-btn" title="Button"
onclick="Modalbox.show(node, {title: this.title, width: 300,  onHide: parent.location.reload}); return false;">Click me</a>

should also work

Greg

unread,
May 25, 2008, 4:27:43 PM5/25/08
to ModalBox
Thanks guys, I appreciate the help, the parent function works
perfectly.
Reply all
Reply to author
Forward
0 new messages