Code: Select all
Procedure IfThisLinkOk(Passed_suri$) ; vm
Protected.BROWSER *browser
Debug "1 LINK Procedure IfThisLinkOk = " + Passed_suri$ ; vm"
ThisLinkItemOk = #False
ResetList(ThisLinkList())
While NextElement(ThisLinkList())
CurrentElementContent$ = ThisLinkList()
; Debug "IfThisLinkOk CurrentElementContent$" + CurrentElementContent$
Position = FindString(Passed_suri$, CurrentElementContent$ , 0 )
If Position > 0
Debug "ThisLinkItemOk = #True " + Passed_suri$
ThisLinkItemOk = #True
EndIf ; Greater than 0 == Yes its a Hit
Wend
If ThisLinkItemOk = #False
; GO TO: https://kidsafebrowser.us/Warning-UnSafe-Site.html
*browser = tab_GetCurrentBrowser()
If *browser
*browser\core\Navigate("http://kidsafebrowser.us/Warning-UnSafe-Site.html") ;
EndIf
EndIf
EndProcedure ; IfThisLinkOk()
If the url is the result of SourceChanged event you will need to use the location.replace() method i posted before, otherwise you can't use Go Back navigation because it returns to the unwanted url.