Okay,
I've managed to have this run in an
ASP.NET application. The user
clicks a button, which then processes some code, and then opens a
FACEBOX with an external page. Here's a procedure I made. It works
as long as you have run the "Attach It onLoad" command in the page.
Public Sub OpenInputFaceBox(ByVal aspxPage As Page, ByVal
sPageTitle As String)
Dim fullappname As String = aspxPage.Request.Url.Host
Dim MyUrl As Uri = aspxPage.Request.Url
Dim iPort As Int32 =
Convert.ToInt32(aspxPage.Request.ServerVariables("SERVER_PORT"))
Dim sWebPath As String = ""
If iPort = 80 Then
sWebPath = aspxPage.Server.HtmlEncode(MyUrl.Scheme) &
"://" & fullappname & aspxPage.Request.ApplicationPath & "/"
Else
sWebPath = aspxPage.Server.HtmlEncode(MyUrl.Scheme) &
"://" & fullappname & ":" & iPort & aspxPage.Request.ApplicationPath &
"/"
End If
Dim sScript As String = ""
sScript &= "$.facebox.loading(true);"
sScript &= "$.get('" & sWebPath & "frmInputBox.aspx" & "?PT="
& sPageTitle & "', function(data) { $.facebox.reveal(data, null) });"
RunScript(sScript, aspxPage, "blabla")
End Sub
The problem I have now is.. I have buttons on that popup page. I want
to process what the user has entered, and then close the FACEBOX. The
button IS clickable, the code gets processed.. but then running this
code FROM within that popup page:
jQuery(document).trigger('close.facebox')
doesn't close the popop. I'm guessing because it's actually a
different page. So how do I tell the page that opened it, to close
the popup?