Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
IE object and encoding
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Applications Internet
Divers
Thread ID:
00920838
Message ID:
00925145
Vues:
35
Lisa,

AFAIK, strconv() should work in VFP7 too. In VFP8 there are more options for ConversionSetting. Anyway, it does not help.
What I want to accomplish in the program is to get the proper control on the page, and then do the appropriate action, like click or type the password. For instance, I want to click on the item having title "Êîíôåðåíöèÿ":
oIE = CreateObject("InternetExplorer.Application")
oIE.Navigate("http://www.foxclub.ru/")
oIE.Visible = .t.
nStartSeconds = SECONDS()
MAX_TIME=60
DO WHILE oIE.ReadyState <> 4 AND (SECONDS()-nStartSeconds < MAX_TIME)
	INKEY(1)
ENDDO


if SECONDS()-nStartSeconds >  MAX_TIME
	oie.quit
	oie=null
	RETURN
ENDIF

WITH oie.Document.getelementsbyTagName("A")
	FOR ia=0 TO .length-1
	 IF .Item(ia).innertext="Êîíôåðåíöèÿ"
	 	.Item(ia).click
	 	?"hello"
	 	EXIT
	 endif
	ENDFOR
ENDWITH

oie=null 

RETURN
And because .Item(ia).innertext does not return the proper text I cannot get to the control.


>If you're limited to VFP 7 I apologize for having confused the issue by bringing up STRCONV(). <s>
>
>So let's go back to the original question.
>
>You ask why it's different on one machine -- presumably that would be because the user's oIE.document.defaultcharset is different on that machine although I don't know for sure.
>
>Let's look at this a different way.
>
>Do you need the data, as it sounds like you do, or do you need the browser open and visible, as you show it in your problem? Maybe you just need to look at a different way to receiving the page results, rather than using oIE.Document?
>
>But without knowing what you are trying to do with the data once you get it, it's difficult to say <s>.
>
>So far all I do know is that you want to use "$" on it.
>
>But I'm guessing that something like READURL.PRG (google this or find it on MSDN) will do what you need.
>
>Once you have the actual data, then as I said before you might want to use AT() or ATC() or additional VFP functions rather than $, but let's talk about that once you have the data you need <s>.
>
>You can, additionally, show the document in IE if you really want to... I'm just not sure that's what you need.
>
>>L<
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform