NotJeff
asked on
CWebControl PostData
I'm using the following code in a VC++5.0(no patches applied), IE4.01
configuration and postData is not working. The web browser control
navigates to the url I give it, but it's method is GET and it doesn't send
my postData. When PostData is not NULL it's supposed to send a
request method of POST and send the data.
Also I sent a breakpoint in BeforeNavigate2() and read the PostData string
it's empty!
Here is the code snippet from my app.
void CMyView::SetNavigationLoca tion(CStri ng url, CString postData)
{
// url = "http://www.ecst.csuchico.edu/~jschlich/Flyfish/fishinfotest.cgi";
// postData = "userid=tim_z&pass=dont_yo u_wish";
CString header;
// Content-Type: application/x-www-form-url encoded\r\ n
header.LoadString(IDS_FORM _URLENCODE D);
COleVariant oleVariant;
COleVariant urlOleVariant( url );
COleVariant dataOleVariant( postData );
COleVariant headerOleVariant( header );
m_WebBrowser.Navigate2(&ur lOleVarian t, &oleVariant, &oleVariant, &dataOleVariant, &headerOleVariant);
}
This problem has got me at a complete stand still. If anyone can help, I will be very
very grateful and acknowledge you as the MFC WebBrowser guru!
Jeff
configuration and postData is not working. The web browser control
navigates to the url I give it, but it's method is GET and it doesn't send
my postData. When PostData is not NULL it's supposed to send a
request method of POST and send the data.
Also I sent a breakpoint in BeforeNavigate2() and read the PostData string
it's empty!
Here is the code snippet from my app.
void CMyView::SetNavigationLoca
{
// url = "http://www.ecst.csuchico.edu/~jschlich/Flyfish/fishinfotest.cgi";
// postData = "userid=tim_z&pass=dont_yo
CString header;
// Content-Type: application/x-www-form-url
header.LoadString(IDS_FORM
COleVariant oleVariant;
COleVariant urlOleVariant( url );
COleVariant dataOleVariant( postData );
COleVariant headerOleVariant( header );
m_WebBrowser.Navigate2(&ur
}
This problem has got me at a complete stand still. If anyone can help, I will be very
very grateful and acknowledge you as the MFC WebBrowser guru!
Jeff
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER