I'm not sure I understood correctly, but how about smth like this:

//
// Assume:
// valid m_spBrowser of type nsCOMPtr<nsIWebBrowser> m_spBrowser;


//    url string should contain valid URL
//    data string should contain posted data e.g. "var1=val1&var2=val2"
//

nsCOMPtr<nsIWebNavigation> webNavigation;
m_spBrowser->QueryInterface(NS_GET_IID(nsIWebNavigation),
        (void **)&webNavigation);

nsCOMPtr<nsIInputStream> dataStream = nsnull;
NS_NewCharInputStream(getter_AddRefs(dataStream), data.c_str());

webNavigation->LoadURI(NS_ConvertASCIItoUCS2(url.c_str()).get(),
        nsIWebNavigation::LOAD_FLAGS_BYPASS_CACHE |     
        nsIWebNavigation::LOAD_FLAGS_BYPASS_PROXY,
        nsnull,
        dataStream,
        nsnull);



Greetings from Israel,
Anton.










Ed Burns wrote:
Back in the bad old days I had to get the presContext from the
docShell, then get the link handler from the presContext, then call
OnLinkClick() to post data from my embedding app.  Is this still the
best way to do it, or is there a more "correct" way?

Thanks,

Ed
_______________________________________________
mozilla-embedding mailing list
[EMAIL PROTECTED]
http://mail.mozilla.org/listinfo/mozilla-embedding

Reply via email to