Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Know of web service for validating U.S. driver's license
Message
 
To
09/11/2004 12:20:59
General information
Forum:
ASP.NET
Category:
Web Services
Miscellaneous
Thread ID:
00959634
Message ID:
00959822
Views:
6
>Thanks in advance.
Here is what I got following replies to your post, it will give you a start, I believe.
pURL="https://fortress.wa.gov/dol/ddl/dsd/"
license="ABCDEFG123AX"
clear

READYSTATE_COMPLETE = 4
MAX_TIME =60
lcSendKey=""
llok=.f.

oIE = CreateObject("InternetExplorer.Application")
oIE.visible=.t.
oIE.Navigate(pURL)


lnWaiting=MAX_TIME
lnStarted = SECONDS()
do while oIE.Readystate <> READYSTATE_COMPLETE OR oie.busy
	lnWaiting = Seconds() - lnStarted
	IF  lnWaiting >= MAX_TIME
		oIE=null
		=MESSAGEBOX("unable to connect, timeout...")
		return
	ENDIF
ENDDO

WITH oie.Document.getElementsByTagname("td")
	IF .length >=1
		FOR ia=0 TO .length-1
			 	IF TYPE(".Item(ia).innerhtml")="C" and ;
						[javascript:navigate('login','0')]$.Item(ia).innerhtml
					.Item(ia).all.Item(1).click
					llok=.t.
				endif
		ENDFOR
	endif
ENDWITH

IF NOT llok
	oIE=null
	=MESSAGEBOX("unable to find/click the 'start application' control ...")
	return
ENDIF

llok=.f.
lnStarted = SECONDS()  &&second page
do while oIE.Readystate <> READYSTATE_COMPLETE OR oie.busy
		lnWaiting = Seconds() - lnStarted
		IF  lnWaiting >= MAX_TIME
			oIE=null
			=MESSAGEBOX("unable to review the second page, timeout...")
		return
	ENDIF
ENDDO

IF TYPE([oie.Document.getelementsbyname("txtPICNumber").Item(0)])="O"
	oie.Document.getelementsbyname("txtPICNumber").Item(0).value=license
ELSE
	oIE=null
	=MESSAGEBOX("unable to find the INPUT box...")
	return
endif	

WITH oie.Document.getElementsByTagname("A")
	IF .length >=1
		FOR ia=0 TO .length-1
			 	IF TYPE(".Item(ia).innerhtml")="C" and ;
						[continue]$LOWER(.Item(ia).innerhtml)
					.Item(ia).click
				endif
		ENDFOR
	endif
ENDWITH


oie=null
return
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform