check the GotFocus Back routine in your WebForm, I don't know if it works when you call a page as a new page, for me it works as a popup and closes a window, like this
p_web.PushEvent('parentupdated')
do refresh::BrowseCustomerServices
the browse is inside the webform
Question related to this, the button is called from the browse and not from the form. Any ideas how to call it from the browse (the getfocusback function)
This is the code I call from he buttton in the row of the browse. The bold text is what I think should refresh the browse based on what you told me and what I understand
PrintAllLabels PROCEDURE (NetWebServerWorker p_web)
LocFileName CSTRING(256) !
LocPDFName CSTRING(256) !
LocTimeStamp LONG !
LoopVar LONG !
! Start of "Data Section"
! [Priority 50]
oHH &tagHTMLHelp
! [Priority 2600]
omit('***',WE::CantCloseNowSetHereDone=1) !Getting Nested omit compile error, then uncheck the "Check for duplicate CantCloseNowSetHere variable declaration" in the WinEvent local template
WE::CantCloseNowSetHereDone equate(1)
WE::CantCloseNowSetHere long
!***
! [Priority 6100]
loc:x Long
packet StringTheory
loc:options StringTheory ! options for jQuery calls
! [Priority 8500]
! End of "Data Section"
! Start of "Local Data After Object Declarations"
! [Priority 5000]
! End of "Local Data After Object Declarations"
CODE
GlobalErrors.SetProcedureName('PrintAllLabels')
p_web.Trace('PrintAllLabels START')
! Start of "Procedure Setup"
! [Priority 2500]
p_web.SetValue('_parentPage','PrintAllLabels')
If p_web.GetSessionLoggedIn() = 0
If p_web.site.LoginPage = ''
p_web.SendError (401,'Unauthorized', 'A login is required to view this page', true , true)
ElsIf p_web.site.LoginPageIsControl
p_web.MakePage(p_web.site.LoginPage)
else
p_web._SendFile(p_web.site.LoginPage)
End
Return
End
! [Priority 7500]
! End of "Procedure Setup"
! Start of "Processed Code"
! [Priority 500]
if p_web.sessionId = '' then p_web.NewSession().
! Start of "Before Header"
! [Priority 5000]
! End of "Before Header"
do Header
! [Priority 1200]
! [Priority 4000]
IF p_web.GetValue('RRH:RequestNumber') > 0
LocTimeStamp = FORMAT(CLOCK(),@T5)
LocPDFName = '$$$' & clip(p_web.SessionID) & LocTimeStamp & '.pdf'
LocFileName = 'labels\' & LocPDFName
WindowProcessSARAWebRequest(p_web.GetValue('RRH:RequestNumber'),LocPDFName)
!DO RefreshBrowse
END!IF
do Footer
! [Priority 8500]
do SendPacket
! [Priority 9500]
! End of "Processed Code"
p_web.Trace('PrintAllLabels END')
GlobalErrors.SetProcedureName()
Return
! Start of "Procedure Routines"
! [Priority 4000]
RefreshBrowse ROUTINE
DATA
loc:parent string(252)
CODE
p_web.PushEvent('gainfocus')
p_web.SetValue('_parentProc_',p_web.SetParent(loc:parent,'WindowUpdateOrder'))
p_web.SetValue('BrowseNewOrders:parentIs','Form')
BrowseNewOrders(p_web)
EXITSendPacket Routine
! Start of "Start of SendPacket Routine"
! [Priority 5000]
! End of "Start of SendPacket Routine"
p_web.ParseHTML(packet,1,0,Net:NoHeader)
packet.SetValue('')
! Start of "End of SendPacket Routine"
! [Priority 5000]
! End of "End of SendPacket Routine"
Header Routine
! Start of "Start of Header Routine"
! [Priority 5000]
! End of "Start of Header Routine"
! Start of "W3 Header Override"
! [Priority 5000]
! End of "W3 Header Override"
p_web.ReplyContentType = p_web.GetContentType('.pdf')
p_web.ReplyContentFixed = 1
packet.setvalue('')
! Start of "End of Header Routine"
! [Priority 5000]
! End of "End of Header Routine"
Footer Routine
! Start of "Start of Footer Routine"
! [Priority 4000]
p_web.ForceNoCache = 1
p_web.HeaderDetails.ContentDisposition = 'attachment; filename="'&CLIP(p_web.SessionID) & CLIP(LocTimeStamp) & '.pdf'&'"'
p_web.ReplyContentType = 'application/octet-stream'
p_web.ReplyContentFixed = true
p_web.SetHeader200()
! End of "Start of Footer Routine"
p_web._Sendfile(clip(p_web.site.WebFolderPath) & '\' & LocFileName)
! Start of "End of Footer Routine"
! [Priority 5000]
DO RefreshBrowse
! End of "End of Footer Routine"
! [Priority 8500]
! End of "Procedure Routines"
! Start of "Local Procedures"
! [Priority 5000]
! End of "Local Procedures"