Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Autofill HTML-form
Message
De
26/01/2007 04:15:30
 
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Divers
Thread ID:
01189464
Message ID:
01189475
Vues:
7
thanks mate ! It works perfect.
i owe you big time ;-)

>It's worked:
>
>oIE.Navigate("http://kbo-bce-ps.mineco.fgov.be/ps/kbo_ps/kbo_search.jsp?lang=nl&dest=SON")
>oDoc=oIE.document
>oIE.Visible=.T.
>oDoc.forms.item(1).item(0).value="0427"
>oDoc.forms.item(1).item(1).value="807"
>oDoc.forms.item(1).item(2).value="711"
>oDoc.forms.item(1).item(3).Click()
>
>You can see result at:
>http://kodu.neti.ee/~juri4/images/ut1.jpg
>
>Have a nice day!
>
>
>>it's a public government site. You may use the code i put below. If you use the same url and values the site will give you a result.
>>
>>Thanks in advance !
>>
>>>Well, can I test it by entered something from my PC?
>>>I see that is a goverment site.
>>>
>>>>Hi Juri,
>>>>
>>>>I know, that's the problem. The name of the button always changes but i can search the name in de source code. No probs.
>>>>
>>>>But i get a 'Syntax error' when executing the line :
>>>>oIE.Document.OND_NR.887928132.Click()
>>>>
>>>>When the explorer is visible i look at the page source to find out the name of the button. Any idea?
>>>>
>>>>>Hi, Guillaume !
>>>>>
>>>>>>I want to load an url from within foxpro and autofill a form on the page and submit the form. I use the following code :
>>>>>>
>>>>>>oIE=CREATEOBJ("InternetExplorer.Application")
>>>>>>oIE.Navigate("http://kbo-bce-ps.mineco.fgov.be/ps/kbo_ps/kbo_search.jsp?lang=nl&dest=SON")
>>>>>>oIE.document.OND_NR.ON.Value = "0427"
>>>>>>oIE.document.OND_NR.ON1.Value = "807"
>>>>>>oIE.document.OND_NR.ON2.Value = "711"
>>>>>
>>>>>This row is for test only purposes?
>>>>>Comment it now.
>>>>>>oIE.visible = .T.
>>>>>
>>>>>Change next row:
>>>>>>oIE.Document.forms(1).Submit()
>>>>>
>>>>>to:
>>>>>>oIE.Document.OND_NR.1472577474.Click()
>>>>>
>>>>>because onClick event of the button first checks validity of the form.
>>>>>Hm... Looks like submit button's name is created dynamically.
>>>>>In this case you must enumerate inputs on the form and
>>>>>look for class="Btn"
>>>>>
>>>>>Let me know whether it (dynamic name of the submit button) true or not
>>>>>
>>>>>wbr,
>>>>>Juri
>>>>>
>>>>>>
>>>>>>I use 'forms(1)' because the form has 2 forms on it.
>>>>>>
>>>>>>I see that the submit is executed but the page has some kind of protection and the fields are emptied and i don't see the result.
>>>>>>When i only fill the textboxes and i manually click the send-button it works fine...
>>>>>>
>>>>>>Anyone any idea what's wrong ?
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform