🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.internet.web
Article #1736

IHTMLFormElement problem

#1736
From: mrlapkoks
Date: Fri, 16 Jul 2004 10:08
40 lines
1896 bytes
Hello!

I have html page with content something like that
...
<form action="okhtml.php" method="post">
<input type="text" maxlength="25" name="a1" value="">
<textarea name="message" rows="20" cols="77"></textarea>

<input type="submit" name="ok" value="Ok">
<input type="submit" name="cancel" value="Cancel">
</form>
...

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. How can I solve this problem?

Here is source code:

...
if(SUCCEEDED(HTMLDocument->get_all(&pAll))) {
  TVariant name;
  TVariant index;
  IDispatch *pDisp = NULL;

  name = "ok";
  index = 0;
  pDisp = NULL;
  if(SUCCEEDED(pAll->item(name,index,&pDisp))) {
     if(pDisp) {
       IHTMLInputElement *pInpEl=NULL;

if(SUCCEEDED(pDisp->QueryInterface(IID_IHTMLInputElement,(LPVOID*)&pInpEl)))
{
          IHTMLFormElement *fe=NULL;
          pInpEl->get_form(&fe);
          if(fe) { fe->submit(); fe->Release(); }
...

Thank you, MrLapkoks
Technical Details
Message-ID: <40f7a918$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!fr.ip.ndsoftware.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Thread: feeec,53ade52720c1861,start
X-Google-Attributes: gidfeeec,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "mrlapkoks" <mrlapkoks@yahoo.com>
Newsgroups: borland.public.cppbuilder.internet.web
Subject: IHTMLFormElement problem
Date: Fri, 16 Jul 2004 13:08:28 +0300
Lines: 42
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: 159.148.17.226
Message-ID: <40f7a918$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1089972504 159.148.17.226 (16 Jul 2004 03:08:24 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!fr.ip.ndsoftware.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail