lnLoadTimeout = 5 lcUrl = "https://www.labcorp.com/wps/portal/insurer/findalab" Thisform.oiweb.Navigate(lcUrl) lnSeconds = SECONDS() DO WHILE (Thisform.oiweb.OBJECT.Busy OR Thisform.oiweb.OBJECT.ReadyState <> 4) ; AND (SECONDS() - lnSeconds) < lnLoadTimeout DOEVENTS ENDDO IF ISNULL(Thisform.oiweb.Document.getElementById("city")) lcStr = STREXTRACT(Thisform.oiweb.Document.body.innerHTML, "", [alt="New Search"]) lcUrl = "https://www.labcorp.com" + STREXTRACT(SUBSTR(lcStr, RAT([href="], lcStr)), [href="], ["]) Thisform.oiweb.Navigate(lcUrl) lnSeconds = SECONDS() DO WHILE (Thisform.oiweb.OBJECT.Busy OR Thisform.oiweb.OBJECT.ReadyState <> 4) ; AND (SECONDS() - lnSeconds) < lnLoadTimeout DOEVENTS ENDDO ENDIF If Thisform.oiweb.Document.readystate = "complete" Thisform.oiweb.Document.getElementById("city").Value="" Thisform.oiweb.Document.getElementById("state").Value="" Thisform.oiweb.Document.getElementById("zipCode").Value=Alltrim(Thisform.combo1.Value) Thisform.oiweb.Document.getElementById("distance").Value="75" Thisform.oiweb.Document.getElementsByTagName("input").Item[20].Click() Endif>