🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Filling forms in Geocities

#892
From: Enrique
Date: Sat, 26 Nov 2005 15:50
43 lines
2405 bytes
I'm trying to fill a form within a webpage hosted in Geocities, the code
works great outside Geocities, I think there is a problem with the
advertising...
How can I solve it?
My code:
//--------------------------------------------------------------------------
-------------------------------------------
bool TInternetExplorer::FillForm(TCppWebBrowser* CppWebBrowser1, AnsiString
nombreCampo, AnsiString valorCampo)
{
        TComInterface<IHTMLDocument2> Doc;

CppWebBrowser1->Document->QueryInterface(IID_IHTMLDocument2,(LPVOID*)&Doc);
        if( Doc )
        {
            TComInterface<IHTMLElementCollection> All;
            Doc->get_all(&All);
            if( All )
            {
                TVariant name = WideString(nombreCampo);
                TVariant index = 0;
                TComInterface<IDispatch> Disp;

                All->item(name, index, &Disp);
                if( Disp )
                {
                    TComInterface<IHTMLInputTextElement> TextInput;    // si
no es tipo texto??

Disp->QueryInterface(IID_IHTMLInputTextElement,(LPVOID*)&TextInput);

                    if( TextInput )
                        {
                         TextInput->put_value(WideString(valorCampo));
                         return true;
                        }
                }
            }
        }
return false;
}
//--------------------------------------------------------------------------
-------------------------------------------
Technical Details
Message-ID: <4388846f@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!newsfeed.hal-mli.net!feeder1.hal-mli.net!news-out.newsfeeds.com!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Thread: feeec,5cd3a50c2feb13b7,start
X-Google-Attributes: gidfeeec,public
X-Google-Language: ENGLISH,ASCII-7-bit
Reply-To: "Enrique" <enridp@yahoo.com.ar>
From: "Enrique" <enridp@yahoo.com.ar>
Newsgroups: borland.public.cppbuilder.internet.web
Subject: Filling forms in Geocities
Date: Sat, 26 Nov 2005 12:50:37 -0300
Lines: 48
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
NNTP-Posting-Host: 200.43.99.72
Message-ID: <4388846f@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1133020271 200.43.99.72 (26 Nov 2005 07:51:11 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!newsfeed.hal-mli.net!feeder1.hal-mli.net!news-out.newsfeeds.com!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail