plutomed Posted July 6, 2009 Share Posted July 6, 2009 Is there a maximum number of cases that a switch can handle? Link to comment https://forums.phpfreaks.com/topic/164884-solved-switch/ Share on other sites More sharing options...
corbin Posted July 6, 2009 Share Posted July 6, 2009 No. Link to comment https://forums.phpfreaks.com/topic/164884-solved-switch/#findComment-869496 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 Link to comment https://forums.phpfreaks.com/topic/164884-solved-switch/#findComment-869498 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"; Link to comment https://forums.phpfreaks.com/topic/164884-solved-switch/#findComment-869503 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. Link to comment https://forums.phpfreaks.com/topic/164884-solved-switch/#findComment-869508 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. Link to comment https://forums.phpfreaks.com/topic/164884-solved-switch/#findComment-869509 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? Link to comment https://forums.phpfreaks.com/topic/164884-solved-switch/#findComment-869514 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. Link to comment https://forums.phpfreaks.com/topic/164884-solved-switch/#findComment-869518 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.