Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Automate WebSite
Message
 
 
To
03/03/2004 05:10:15
Marcus Hüneke
Heidelberger Druckmaschinen
Wiesloch, Germany
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00881118
Message ID:
00882675
Views:
29
Marcus,

You have to wait until the page finishes loading before oIE.Document will in fact become a valid object reference. Then you have to know how the page is actually constructed, because there can be more than one form on the page, that is why there is a forms collection, but notice the first form index is 0. If there is not form on the page I would suspect that loDoc.Forms[0] would return .null. Another issue that comes into play are frames, if the page has frames you need to look for the form in the document in the right frame.

I don't have a lot of time this morning to play with it, I'll double check later today.

I think someone has a chunk of code in the files section herer that does a UT login you might grab that code to take a look at it.

>Tried it first with universalthread and it works fine to login.
>
>With the application in our intranet I get an error in line:
>"for i = 0 to loForm.Length-1"
>Error message:
>"loform is not an object"
>
>
>loDoc = oIE.Document
>loForm = loDoc.forms(0)
>I have debugged the code and found out that loDoc is an object.
>But for loform I get back "NULL"
>
>
>How can that be. There are only two input fields ( and 2 buttons for login and change password) on the screen ?
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform