atrum Posted January 22, 2011 Share Posted January 22, 2011 So I just happen to name a function as "register()" and when I go to run that function on an event I get back in firebug. "register is not a function". If I change that functions name by 1 character it works fine. Below is an example of what I tried. At first I thought that maybe register was a reserved keyword, but I am not able to find any documentation that supports that thought. Can anyone confirm or deny this? function tregister(){ alert("Works."); } function register(){ alert("Does not work."); } Quote Link to comment https://forums.phpfreaks.com/topic/225348-is-register-an-illegal-name-for-a-function/ Share on other sites More sharing options...
atrum Posted January 22, 2011 Author Share Posted January 22, 2011 Never mind, looks like JQuery was the cause. Oh well, no functions name register for me then. Quote Link to comment https://forums.phpfreaks.com/topic/225348-is-register-an-illegal-name-for-a-function/#findComment-1163741 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.