Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
October 8, 2007, 1:48 pm
rate this thread
It has three links:
#1 clears a Trace area and adds three lines
#2 appends another line
#3 invokes functions 1 & 2 (with their respective arguments), but it
only presents the results of #1. It seems as though #2 never gets
I tested this in both Firefox2 and IE7, as well my IDE, Aptana.
Did I make some dumb mistake, as usual :-( ?
Thanks in Advance,
has very low traffic and waits upon moderator-review before actually
posting anything. I prefer this forum.
OT - Re: onClick="CallMultipleFns" only invokes first function
Line 68 is:
var iCount = arElements.length
This fails because arElements is not defined. At this point in time all
of the expected output has already appeared, so you don't notice the
failure (which prematurely terminates the script).
BUT, when you have an outer script that calls the inner one twice, the
failure of the first call also terminates the outer script and the
second call is never made.
Remove the comment delimiters from the line (2 lines up):
// var arElements = document.getElementsByTagName(sType)
and it will work.
to start looking for this sort of thing.
Re: OT - Re: onClick="CallMultipleFns" only invokes first function
Thanks for your excellent help.
That was my stupid mistake: I had fooled around with this code so
much that I left trash on the bottom. I excised it all, and it ran as
I didn't know that. Thanks for that heads-up.
I didn't think of it, because I haven't used it much, but I should
have run this with Firebug enabled. That was another stupid mistake.