D
donpro
I've managed to separate JavaScript from my code by employing DOM
listeners and coding in separate JS files in all of my modules except
one.
I have a PHP file called via an AJAX routine which returns a table.
In the <th> tags representing my columns headers, I've had to add the
JavaScript onclick() code to the <a> tags as attempting to add DOM
Listeners fails with "obj has no properties" - I suspect it probably
has to do with the nature of the AJAX call and the fact that this code
doesn't exist in the calling file and so not part of the original DOM
tree.
So I guess I have no choice but to leave the JavaScript onclick() code
in their - maybe I'm overthinking this in that not everything must be
separated?
Or is there a way...
Thanks,
Don
listeners and coding in separate JS files in all of my modules except
one.
I have a PHP file called via an AJAX routine which returns a table.
In the <th> tags representing my columns headers, I've had to add the
JavaScript onclick() code to the <a> tags as attempting to add DOM
Listeners fails with "obj has no properties" - I suspect it probably
has to do with the nature of the AJAX call and the fact that this code
doesn't exist in the calling file and so not part of the original DOM
tree.
So I guess I have no choice but to leave the JavaScript onclick() code
in their - maybe I'm overthinking this in that not everything must be
separated?
Or is there a way...
Thanks,
Don