Article View: borland.public.cppbuilder.internet.web
Article #1740Re: IHTMLFormElement problem
From: Remy Lebeau (TeamB)
Date: Fri, 16 Jul 2004 18:06
Date: Fri, 16 Jul 2004 18:06
33 lines
1881 bytes
1881 bytes
"mrlapkoks" <mrlapkoks@yahoo.com> wrote in message
news:40f7a918$1@newsgroups.borland.com...
> I want to make a program that automaticly presses "Ok"
> or "Cancel" button and i can do that, but problem is with
> parameter "value", because this parameter is not passed
> to okhtml.php.
IHTMLFormElement::submiot() does not send the value of any submit buttons at
all. Try calling the click() method on the particular button that you want
instead, ie:
#include <utilcls.h>
TComInterface<IHTMLElementCollection> pAll;
if( SUCCEEDED(HTMLDocument->get_all(&pAll)) )
{
TVariant name = "ok";
TVariant index = 0;
TComInterface<IDispatch> pDisp;
if( SUCCEEDED(pAll->item(name, index, &pDisp)) )
{
TComInterface<IHTMLElement> pEl;
if( SUCCEEDED(pDisp->QueryInterface(IID_IHTMLInputElement,
(LPVOID*)&pEl)) )
pEl->click();
}
}
Gambit
Technical Details
Message-ID:
<40f81914$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!news.zanker.org!npeer.de.kpn-eurorings.net!feed.news.schlund.de!schlund.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<40f7a918$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: feeec,53ade52720c1861 X-Google-Attributes: gidfeeec,public X-Google-Language: ENGLISH,ASCII-7-bit From: "Remy Lebeau \(TeamB\)" <gambit47.no.spam@no.spam.yahoo.com> Newsgroups: borland.public.cppbuilder.internet.web References: <40f7a918$1@newsgroups.borland.com> Subject: Re: IHTMLFormElement problem Date: Fri, 16 Jul 2004 11:06:56 -0700 Lines: 35 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1409 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 NNTP-Posting-Host: 68.69.17.41 Message-ID: <40f81914$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1090001172 68.69.17.41 (16 Jul 2004 11:06:12 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!news.zanker.org!npeer.de.kpn-eurorings.net!feed.news.schlund.de!schlund.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail