Re: Need help with IHTML input button element



hi igor,
thanks a lot for your reply. well, i tried what u suggested, but i got
a compile time error which says:
'click' : is not a member of 'IHTMLInputButtonElement'
any suggestions on what i can do? if i submit the reverse geocode
button on that sitre programmatically, all that happens is constant
refreshing of the same page.
any idea what might be the problem? i am an absolute newbie to MFCs and
web browser controls!
thanks in advance,
avik

Igor Tandetnik wrote:
Avik <avikray84@xxxxxxxxx> wrote:
I'm trying to fill some values into text fields in
http://samples.thinkgeo.com/GeoCodeUSASampleApps/GeoCodeUSASample.aspx
. but i'm not able to submit the reverse geocode button
programmatically. can anyone please help me with this?
following is the concerned part of the code:

//Programmatically submitting the reverse geocode button
MSHTML::IHTMLInputButtonElementPtr act1=pAllElems->item
("btnReverseGeocode");
action->form->submit();

Make it

act1->click();

The page is a single form having two submit buttons. The server needs to
know which one was used to submit the form, so you need to imitate
clicking on a button rather than going directly through the form
element.
--
With best wishes,
Igor Tandetnik

With sufficient thrust, pigs fly just fine. However, this is not
necessarily a good idea. It is hard to be sure where they are going to
land, and it could be dangerous sitting under them as they fly
overhead. -- RFC 1925

.