Petty_Crim Posted January 10, 2008 Share Posted January 10, 2008 I'm getting this odd error 'Too much recursion' when I run my script. From googling it appears it occurs when you try to call a function inside another function. The error in firefox points to this line, which is inside the function 'ajaxFunction': document.getElementById(text_button).onclick= ajaxFunction(i, 1, position_count); I take that line is calling a function rather then setting onclick to a function? If this is the case how do i set onclick to a function? Quote Link to comment Share on other sites More sharing options...
Petty_Crim Posted January 10, 2008 Author Share Posted January 10, 2008 I solved it you have to use: document.getElementById(text_button).onclick= function() {ajaxFunction(i, 1, position_count)}; Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.