Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Andrzejek on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Urgent:Firing javascript on IHTLElement interface

Status
Not open for further replies.

ranadhir

Programmer
Nov 4, 2003
54
IN
We are parsing the html elements on a form and settings values on them programatically.
Suppose there is a SELECT element which has a javascript written on the 'onchange' event.
However,although we cant set the selected inex on the SELECT element programmatically,it does not seem to trigger off the corresponding javascript.

We are doign the following;
CComPtr<IHTMLSelectElement> spSelectElem;
HRESULT hr=pelem->QueryInterface(//Ask for an Select interface
IID_IHTMLSelectElement,(void **)&spSelectElem);
................................................
long idx;
std::stringstream ss(pevent.get_args());
ss >> idx;

hr=spSelectElem->put_selectedIndex(idx);


This lets us see the selected item changing but no javascript being fired.What do we need to do?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top