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? Link to comment https://forums.phpfreaks.com/topic/85363-solved-too-much-recursion/ 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)}; Link to comment https://forums.phpfreaks.com/topic/85363-solved-too-much-recursion/#findComment-435606 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.