BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

WebBrowser Posting Data

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi ActiveX Controls Usage
View previous topic :: View next topic  
Author Message
Jared Monson
Guest





PostPosted: Sat Oct 04, 2003 9:12 pm    Post subject: WebBrowser Posting Data Reply with 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
Pascal Chapuis
Guest





PostPosted: Wed Oct 08, 2003 8:46 am    Post subject: Re: WebBrowser Posting Data Reply with quote



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
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi ActiveX Controls Usage All times are GMT
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.