How can I hook up an event to a function name I have defined as a string?
I\'m using Prototype.js, although this is not Prototype-speficic.
$(inputId
Do you know what the onclick property contains or what type it is? I assume this is prototype specific stuff, as "fields" does not exist in DOM forms.
Perhaps?
setTimeout ( "myFunc()", 1 );
Just an eval
would do the job
var call = eval("method_name").call(args);
Looks like formData.fields[x].onclick
holds the name of a global function? If so try:
$(inputId).observe('click', window[formData.fields[x].onclick]);