Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

How to fill the SELEKT field

YuranYuran Member Posts: 1
Hi all,

As on this site: [URL="http://sms.idknet.com/"]http://sms.idknet.com/[/URL] how to fill the SELEKT field?

Here my code:
[code]void __fastcall TForm1::Button6Click(TObject *Sender)
{
/* IDispatch *pDisp1=NULL; TVariant vIndex = 2;
IHTMLElementCollection *pAll ;

TVariant vName1 = "prefix"; // ??? HTML ????
if(SUCCEEDED(pAll->item(vName1, vIndex, &pDisp1)) && pDisp1)
{
IHTMLSelectElement *pInput = NULL;
if(SUCCEEDED(pDisp1->QueryInterface(IID_IHTMLSelectElement,(LPVOID*)&pInput)) && pInput)
{
pInput->put_value(WideString("String"));
pInput->Release();
}
pDisp1->Release();
}
*/
IHTMLDocument2 *htm = 0;
WB->Document->QueryInterface(&htm);
if(htm)
{
IHTMLElementCollection *col = 0;
htm->get_all(&col);
if(col)
{
IDispatch *el_disp = 0;
col->item(TVariant(L"prefix"), TVariant(0), &el_disp); // ????? ??????????? ??? ???? ("pole_1") ? ??????? ?? ????????
if(el_disp)
{
IHTMLElement *el = 0;
el_disp->QueryInterface(&el);
if(el)
{
el->setAttribute(L"value", TVariant(L"2"), 0); // ????? ?????????? "value" ??????????? ???????? "2"
el->Release();
el = 0;
}
el_disp->Release();
el_disp = 0;
}
col->Release();
col = 0;
}
htm->Release();
htm = 0;
}


}[/code]

If to make so that field it is only cleared. What to me to do?

(WB it WebBrowser)
Sign In or Register to comment.