Refresh Parent on floatbox close

Page: 1

Author Post
Member
Registered: Oct 2014
Posts: 2
I've been trying to wrap my head around how to do this and I was able to do it years ago on like 4.x but for some reason I can't figure it out :(

I have a href that opens a form and when I click the send button it writes to the db and then closes the floatbox window but I also would like it to refresh the parent [main page] when it closes.

an example link is as follows
<a class="floatbox" data-fb-options="autoFit:true colorTheme:&#039;black&#039; contentBackgroundColor:#263b64 measureHTML:true inFrameResize:true minContentWidth:919 minContentHeight:620 maxContentWidth:919 maxContentHeight:620 minBoxWidth:919 minBoxHeight:620" href="/inc/EditForm.asp?mode=FormHA"><%=rsHeadingA%></a>


which opens the form in a floatbox

Then when I click the update it calls this

Function FBClose()
%>
<script>
parent.fb.end();
</script>
<%
End Function


all this works great, but what and where do I put something like fb.parent.refresh or whatever?

Thanks
Administrator
Registered: Aug 2008
Posts: 3382
It's as simple as
parent.fb.end( &#039;self&#039; );

Details are in the API Reference.

There's also a loadPageOnClose option which provides an alternate way to do the same thing.
Member
Registered: Oct 2014
Posts: 2
admin wrote
It's as simple as
parent.fb.end( &#039;self&#039; );

Details are in the API Reference.

There's also a loadPageOnClose option which provides an alternate way to do the same thing.


Well now I feel dumb because that worked like a charm!

Thank you!

I read that page many times but missed this crucial line

"The string 'self' will cause the currently loaded base page to refresh" DOH!

Page: 1