Sunday, March 11, 2012

pass parameters into load function

My understanding is that all functions will be sent a sender argument and an eventArgs argument. From this you should be able to get to what you need. In your case, I'm not 100% sure what object is getting sent as sender and what is getting sent as the eventArgs. I'll explain how I have gone about finding out how to identify what properties or methods are available to me for any given control/object

The basic function is
function myfunction(sender, eventArgs)
{
...
}

The sender and eventArgs objects often have what you need. Use debug.dump to find out what properties are available to you as in this example

debug.dump( sender, "Sender", true, "+") ;

If the sender or eventArgs are not the object, then you may be able to reference the DOM so you can get what you need. Take, for example, if the function argument sender is a reference to the DOM document object, you can get the value of another object easily via a call such as

sender.getElementById('someID');

Even though this does not answer your question directly, I hope it helps.

-ATDIII

No comments:

Post a Comment