Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
XML problems
Message
From
25/04/2000 15:40:11
 
 
To
25/04/2000 05:51:21
General information
Forum:
Visual FoxPro
Category:
Internet applications
Title:
Miscellaneous
Thread ID:
00363036
Message ID:
00363309
Views:
18
>I have a problem sending HTML containing an XML-file. I use the following code found on this site:
>
>oIE = CREATEOBJECT("InternetExplorer.Application")
>oIE.Navigate("c:\xmlbest.htm")
>oIE.Document.Forms(0).Submit.Click()
>oIE.Visible = .T.
>
>It works sometimes, but i often get an error code saying that the document (oIE.Document) isn't a part of the object. What can I do?
>


The Navigate method is asynchronous. This means that if you're not careful, your next line of code might attempt to access an object that is not yet loaded. You need to poll oIE.ReadyState for the value 4 and then poll oIE.Document.ReadyState for the value "complete" before executing any further code.


>Another question: after i have send the html-file i receive a confirmation file, which is an xml-file. I want to save the file from the code in Foxpro. Is there any code like oIE.SaveAs("") or something to save the current file viewed???

oIE.ExecWb(4,0)

will display the Save As dialog, but I am not sure if it is possible to pass a file name. Let us know if you find a way.
Erik Moore
Clientelligence
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform