>Hi,
> I have download the sample file for the "Control Internet Explorer from VFP", I don't sure about the following code:
>oie.document.script.window.document.forms(1).username.value="VFP"
>
>it working in the sample code, but if i cutomise something there are error.
>
>for example,
>**ABOVE WILL BE THE SAME**
>oie.navigate("
http://www.levelextreme.com")
>oie.document.script.window.document.forms(1).KEY.value="xxxx"
>oie.document.script.window.document.forms(1).PASSWORD.value="xxxx"
>
>ERROR MESSAGE: The object cannot be found.
>It work if i customise it to
www.hotmail.com. Again, but happen if there are option, checkbox??
The easiest way to look at this is to clip the html and save it in a file on your hard drive with the extension .htm. Then in the windows explorer click once on that file, then rightmouse click and edit with visual studio. Visual Interdev will let you look at the controls.
Forms() is a collection. So your form might be forms(0) or forms(1),etc.
As for checkboxes they are handled like this:
oie.document.forms[0].Bankruptcy.checked=.t.
To uncheck the box set checked to .f.
If using IE 4 you can get the entire html with the following code:
returndoc=oie.document.body.outerhtml
strtofile(returndoc,'thecurrenthtml.htm')
To get the html with the html tags stripped:
retdocnotags = oie.document.body.CreateTextRange(0,0)
strtofile(retdocnotags.text,'htmlnotags.htm')
John Harvey
Shelbynet.com
"I'm addicted to placebos. I could quit, but it wouldn't matter." Stephen Wright