D
David Mark
It is so close to working now - I can't thank you enough for the time and
effort you have put in to helping me with this. Could I just ask one or two
more questions?
IE and FF are both telling me that I'm missing a closing parenthesis but I
can't work out where in { disableButtons(); oldOnClick(); }; })(o(); it
should be - can you help?
function oneClick() {
var buttons = document.getElementsByTagName("input");
for (var i = 0; i < buttons.length; i++) {
if (buttons.getAttribute("type") == "button" ||
buttons.getAttribute("type") == "submit") {
var oldOnClick = buttons.onclick;
buttons.onclick = (function(o) { return function(e)
{ disableButtons(); oldOnClick(); }; })(o();
I should have made it more clear. Replace "oldOnClick()" with "o()",
not the passed parameter "o."
buttons.onclick = (function(o) { return function(e)
{ disableButtons(); o(e); }; })(oldOnClick);
And make sure oldOnClick actually exists before doing this.