Click to See Complete Forum and Search --> : Which Event
vmahalin
03-31-2003, 04:02 PM
I have a VB object embedded in IE which parses some commands from the server and raises events accordingly to reflect the changes in Javascript, I mean the event handler is in Javascript.
Now for instance, my VB object parses a command and decides a row has to be added to the table, so it raises an event RowInsert , the handler for this event has to be in Javascript.
My query is, when would I evoke this handler and from which object.......cannot do it in onload, as events are raised all the time. If I did vbobject.ondataAvailable = Eventhandler.....will a row be inserted whenever a RowInsert event is raised from the VB object, or on someother event of the object....
Anyone! Thanks.
vmahalin
03-31-2003, 07:23 PM
VB object embedded in IE means an OCX embedded using the <object> tag.
For the cell to react on an Event as you have mentioned, I would have to click the cell.....since u have used the keyword "onClick".
But my query is a little different -
Some Server ----Pumps Data----> VB object parses that data and finds out that a command to add a row has been issued from the server (Code is in ActiveX DLL Project) , hence VB fires an event (i.e RaiseEvent InsertRow) ----> Handler is in the Javascript file where this object is embedded as mentioned above.
As and when command is issued lets say like
RI R2 234 (Row Insert ID=R2 Value=234)..which is parsed by VB object...and raises an event RowInsert...I want a row to be dynamically inserted in an empty table. My question in which event or when would I call this event handler in the Javascript code , since these commands can keep flowing ....any any point of time till the Server keeps serving with more data.
vmahalin
04-01-2003, 12:47 AM
OK, let me make things more clear.......once the page has been loaded...that is the page has been through onload etc.....
Don't confuse yourself with the embedded object.....assume that the server is the VB object....
Now, at this point of time, server wishes to add a row dynamically to an empty table, that is the user must not click on any button to insert the row.....a row has to inserted of its own when data from the server arrives...the moment the server fires an event RowInsert (In VB -> RaiseEvent RowInsert) will the event handler in the following code
automatically fire and add a row ?
In Javascript
<Script id=SomeScript For=vbObj Event="RowInsert()" >
Do something();
</Script>
()