FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour How to fire "Submit" button in Explorere ActiveX?
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
How to fire "Submit" button in Explorere ActiveX?
Posted: Wed Sep 10, 2008 05:21 PM
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 246
Joined: Sat Mar 03, 2007 08:42 PM
How to fire "Submit" button in Explorere ActiveX?
Posted: Thu Sep 11, 2008 07:14 AM
Antonio,

Sorry, but I can't get it to work. I always get error trying to do the :Submit()

I tried:
oActiveX:GetProp("Document"):GetProp("Forms"):Submit()
oActiveX:GetProp("Document"):GetProp("Forms")[0]:Submit()
oActiveX:GetProp("Document"):GetProp("Forms[0]"):Submit()
oActiveX:GetProp("Document"):GetProp("frm_test"):Submit()

And so many other variants, but no luck. Can you try it on your end?
Thanks!

To give you a hint, this is a working xHarbour sample:
PROCEDURE Main()

   LOCAL oIE

   oIE := CreateObject( "InternetExplorer.Application" )
   oIE:Navigate( "http://www.winfakt.be/form_test_1.htm" )
   oIE:Visible := .T.

   WHILE oIE:Busy
      SecondsSleep( 1 )
   END

   oIE:Document:Forms[0]:Submit()

RETURN


Patrick
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
How to fire "Submit" button in Explorere ActiveX?
Posted: Thu Sep 11, 2008 07:56 AM

Patrick,

Please try it this way:

oActiveX:GetProp("Document"):Forms[0]:Submit()

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 246
Joined: Sat Mar 03, 2007 08:42 PM
How to fire "Submit" button in Explorere ActiveX?
Posted: Thu Sep 11, 2008 08:01 AM
Antonio Linares wrote:Please try it this way:
oActiveX:GetProp("Document"):Forms[0]:Submit()
Works!!!
Damned!! Why did I forget to try just THAT one.. :-)

Thanks Antonio!

Patrick
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
How to fire "Submit" button in Explorere ActiveX?
Posted: Thu Sep 11, 2008 08:09 AM

This is a brief explanation about the Class TActiveX that may help to other users too:

An ActiveX control is like another "visual" control, where events arrive, and has properties (GetProp(), SetProp() methods) and methods (Do() method).

The ActiveX control manages OleAuto objects, so when we do:

oDoc = oActiveX:GetProp( "document" )

oDoc is an OleAuto object. From that moment on, we can manage oDoc as we are used with OleAuto objects :-)

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 246
Joined: Sat Mar 03, 2007 08:42 PM
How to fire "Submit" button in Explorere ActiveX?
Posted: Thu Sep 11, 2008 08:15 AM
Antonio,

Antonio Linares wrote:oDoc = oActiveX:GetProp( "document" )
oDoc is an OleAuto object. From that moment on, we can manage oDoc as we are used with OleAuto objects :-)
Yes, this is the trick! With oDoc we can do a lot of things now!

Thanks! :-)

Patrick

Continue the discussion