🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: TWebBrowser how to put_value() for <input type="file">

#725
From: Remy Lebeau (TeamB)
Date: Tue, 31 Oct 2006 00:24
19 lines
1619 bytes
"Hans Galema" <notused@notused.nl> wrote in message
news:45468718@newsgroups.borland.com...

> For TWebBrowser in Turbo C++ I'm puzzled how to use
> put_value() for <input type="file">

You cannot use it at all.  The IHTMLInputFileElement::value property is
read-only.  This is by design as part of Microsoft's security model.

The only way to fill in the field programmably is to set focus to the edit
control itself (use IHTMLElement::focus()) and then send keystrokes to it.
Otherwise, you will have to stop using TWebBrowser to submit the forms at
all.  Use an HTTP library to program to the HTTP protocol directly.  Indy,
for example, has a special TStream class specifically for uploading
form-based fields, including files.


Gambit
Technical Details
Message-ID: <4546982a$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!news3.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail
References: <45468718@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: feeec,2bc0d92930b979d2
X-Google-Attributes: gidfeeec,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Remy Lebeau \(TeamB\)" <no.spam@no.spam.com>
Newsgroups: borland.public.cppbuilder.internet.web
References: <45468718@newsgroups.borland.com>
Subject: Re: TWebBrowser how to put_value() for <input type="file">
Date: Mon, 30 Oct 2006 16:24:28 -0800
Lines: 21
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: 69.169.4.232
Message-ID: <4546982a$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1162254378 69.169.4.232 (30 Oct 2006 16:26:18 -0700)
Path: arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!news3.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail