How to put HTML?
-
I want to put HTML code to MSHTML. The code contains "FRAMESET" tag. I tried,,, IHTMLDocument3* doc3; ////get pointer doc3->get_documentElement(&pElement); pElement->put_outerHTML(L"
") But I couldn't put HTML code. How to put HTML code?? Please tell me. I thought hardly.") But I couldn't put HTML code. I tried next,, doc2->get_body(&pElement); pElement->put_innerHTML(L" -
I want to put HTML code to MSHTML. The code contains "FRAMESET" tag. I tried,,, IHTMLDocument3* doc3; ////get pointer doc3->get_documentElement(&pElement); pElement->put_outerHTML(L"
") But I couldn't put HTML code. How to put HTML code?? Please tell me. I thought hardly.") But I couldn't put HTML code. I tried next,, doc2->get_body(&pElement); pElement->put_innerHTML(L"Try this. It works for me. From Steve. MSHTML::IHTMLElementPtr spEle; MSHTML::IHTMLDocument2Ptr spDoc2; CString sHtml; sHtml = "some HTML text here"; // get spDoc2 from CHtmlView spDoc2 = m_pBrowserApp->get_Document( (IDispatch**)&spDoc2 ); if ( spDoc2 == NULL ) return; spEle = spDoc2->Getbody(); if ( spEle == NULL ) return; spEle->PutinnerHTML( (LPCTSTR)sHtml );
-
I want to put HTML code to MSHTML. The code contains "FRAMESET" tag. I tried,,, IHTMLDocument3* doc3; ////get pointer doc3->get_documentElement(&pElement); pElement->put_outerHTML(L"
") But I couldn't put HTML code. How to put HTML code?? Please tell me. I thought hardly.") But I couldn't put HTML code. I tried next,, doc2->get_body(&pElement); pElement->put_innerHTML(L"Unlikely to work, just because in HTML a tag is not inside a tag. I would suggest to do instead : doc3->Write("..."); (which is the equivalent of Javascript's document.write("...") ),
And I swallow a small raisin.
-
I want to put HTML code to MSHTML. The code contains "FRAMESET" tag. I tried,,, IHTMLDocument3* doc3; ////get pointer doc3->get_documentElement(&pElement); pElement->put_outerHTML(L"
") But I couldn't put HTML code. How to put HTML code?? Please tell me. I thought hardly.") But I couldn't put HTML code. I tried next,, doc2->get_body(&pElement); pElement->put_innerHTML(L"I tried,, BSTR bstr = SysAllocString(L"~~~"); SafeArrayCreateVector(VT_VARIANT, 0, 1); SafeArrayAccessData(sfArray,(LPVOID*) & param); param->vt = VT_BSTR; param->bstrVal = bstr; SafeArrayUnaccessData(sfArray); document->write(sfArray); But 'FRAME page' is blank page. Of course,The Page exists. I think document reset. Please tell me another method. Is it impossible ?
-
I tried,, BSTR bstr = SysAllocString(L"~~~"); SafeArrayCreateVector(VT_VARIANT, 0, 1); SafeArrayAccessData(sfArray,(LPVOID*) & param); param->vt = VT_BSTR; param->bstrVal = bstr; SafeArrayUnaccessData(sfArray); document->write(sfArray); But 'FRAME page' is blank page. Of course,The Page exists. I think document reset. Please tell me another method. Is it impossible ?
That works fine. In fact, when you do the equivalent of document.write() when the document is finished loading, IE simply creates a new one and put your HTML code in it. So, you should see the frames for your frameset. Please remember that a frameset by itself is a very special HTML tag that has no meaning inside an HTML .... If your aim is only to have one or more frames, I would recommend to use the tag instead, and use putinnerhtml,
And I swallow a small raisin.