471,618 Members | 1,195 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,618 software developers and data experts.

onClick="CallMultipleFns" only invokes first function

Hi All,

I put up a toy webpage to test the use of various javascript
functions, etc.:
http://home.comcast.net/~CaptQueeg/JavaScriptDemo3.html

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
invoked.

I tested this in both Firefox2 and IE7, as well my IDE, Aptana.

Did I make some dumb mistake, as usual :-( ?

Thanks in Advance,
Richard

P.S. I posted a version of this question on JavaScript Forum, but it
has very low traffic and waits upon moderator-review before actually
posting anything. I prefer this forum.

Oct 8 '07 #1
1 1600
Hi Chris,

Thanks for your excellent help.
Line 68 is:
var iCount = arElements.length
This fails because arElements is not defined. [snip]
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
expected.
In Firefox:
Tools
Error console

will show you any JavaScript parsing or execution errors. This is where
to start looking for this sort of thing.
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.

Best wishes,
Richard

Oct 9 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by jojowebdev | last post: by
6 posts views Thread by Adrian | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.