Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
XML problems
Message
De
26/04/2000 23:12:21
 
 
À
25/04/2000 15:40:11
Information générale
Forum:
Visual FoxPro
Catégorie:
Applications Internet
Titre:
Divers
Thread ID:
00363036
Message ID:
00363967
Vues:
19
>>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.

Wouldn't it be possible to extract the document.tostring or the form.outerhtml and write that using VFP's STRTOFILE(), or am I missing something obvious?
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform