Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Shell.explorer.2
Message
 
 
To
15/06/2011 19:16:19
General information
Forum:
Visual FoxPro
Category:
Internet applications
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Vista
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01514262
Message ID:
01514628
Views:
108
This message has been marked as the solution to the initial question of the thread.
Try
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
>
>Thank you for your reply.
>
>I have been trying to click on the "new search" button but I could not figure it out.
>
>Can you please help me to do that, or is there way arround that every time I do find lab, I'm able to start a new search every time I close the form and run it again.
>
>Regards,
>
>Bob
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform