 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Jared Monson Guest
|
Posted: Sat Oct 04, 2003 9:12 pm Post subject: WebBrowser Posting Data |
|
|
I am working with TWebBroswer on D5. I can't get the .Navigate to do a
post, with the postData I send it. It opens the new browser window and
loads the URL page, but the data isn't posted.
Code:
var ov1,ov2: OleVariant;
web1: TWebBrowser;
begin
web1:= TWebBrowser.Create(application);
ov1:= navOpenInNewWindow + navNoReadFromCache + navNoReadFromCache +
navNoWriteToCache;
ov2:= widestring('DATA1=help&DATA2=me');
web1.Navigate(widestring('http://localhost/testsite/test.cfm'), ov1,
EmptyParam, ov2);
end;
thx for the help
|
|
| Back to top |
|
 |
Pascal Chapuis Guest
|
Posted: Wed Oct 08, 2003 8:46 am Post subject: Re: WebBrowser Posting Data |
|
|
The TargetFrameName parameter should be "0"
, PostData parameter is an array of variants (VarArrayCreate) with #0 final
char.
and Headers parameter should be 'Content-Type:
application/x-www-form-urlencoded'+#13#10#0; // Post page
....
There are many samples on the web around this problem.
| Quote: | I am working with TWebBroswer on D5. I can't get the .Navigate to do a
post, with the postData I send it. It opens the new browser window and
loads the URL page, but the data isn't posted.
Code:
var ov1,ov2: OleVariant;
web1: TWebBrowser;
begin
web1:= TWebBrowser.Create(application);
ov1:= navOpenInNewWindow + navNoReadFromCache + navNoReadFromCache +
navNoWriteToCache;
ov2:= widestring('DATA1=help&DATA2=me');
web1.Navigate(widestring('http://localhost/testsite/test.cfm'), ov1,
EmptyParam, ov2);
end;
thx for the help
|
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|