plutomed Posted July 6, 2009 Share Posted July 6, 2009 Is there a maximum number of cases that a switch can handle? Quote Link to comment Share on other sites More sharing options...
corbin Posted July 6, 2009 Share Posted July 6, 2009 No. Quote Link to comment Share on other sites More sharing options...
ldougherty Posted July 6, 2009 Share Posted July 6, 2009 There are no limitations according to the manual. http://php.net/manual/en/control-structures.switch.php Quote Link to comment Share on other sites More sharing options...
plutomed Posted July 6, 2009 Author Share Posted July 6, 2009 I have a switch staement that has 16 cases and the default. Insted of calling the 16th. It writes out the default. Why? Just thinking about it, I don't know why I'm doing it with js, I could do it with php. Aswell as that I get this error: Webpage error details User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; InfoPath.2; OfficeLiveConnector.1.3; OfficeLivePatch.0.0) Timestamp: Mon, 6 Jul 2009 01:14:40 UTC Message: Object required Line: 10 Char: 2 Code: 0 URI: http://www.plutomedia.net/26.06.2009/scripts/scripts.js The line its corrosponding to is the second line here: var docget = document.getElementById('HintBar'); docget.style.display="block"; Quote Link to comment Share on other sites More sharing options...
plutomed Posted July 6, 2009 Author Share Posted July 6, 2009 Gawd I hate JS but it is usefull. Quote Link to comment Share on other sites More sharing options...
plutomed Posted July 6, 2009 Author Share Posted July 6, 2009 Fixed the problems...Forgot a "break;" and was trying to change a divs propertys before it has been created. Gawd I'm such an idiot. Quote Link to comment Share on other sites More sharing options...
TheFilmGod Posted July 6, 2009 Share Posted July 6, 2009 Why are you hard coding everything? Ever heard of the jquery framework? Quote Link to comment Share on other sites More sharing options...
plutomed Posted July 6, 2009 Author Share Posted July 6, 2009 Nope. I don't like JS, I only use it if I have to. 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.