Michael34 Posted February 17, 2015 Share Posted February 17, 2015 <script>function myfunction30(qual){ golbal qual; if if(document.getElementById('nota30').checked) { qual++;}}var qualy=myfunction1(qual)+myfunction2(qual)+myfunction3(qual)+myfunction4(qual)+myfunction5(qual)+myfunction6(qual)+myfunction7(qual)+myfunction8(qual)+myfunction9(qual)+myfunction10(qual)+myfunction11(qual)+myfunction12(qual)+myfunction13(qual)+myfunction14(qual)+myfunction15(qual)+myfunction6(qual)+myfunction17(qual)+myfunction18(qual)+myfunction19(qual)+myfunction20(qual)+myfunction21(qual)+myfunction22(qual)+myfunction23(qual)+myfunction24(qual)+myfunction25(qual)+myfunction26+myfunction27+function28+funtion29+function30<button onclick="myfun()">Submit</button>;function myfun(){ window.alert("Your qualification is: "+qualy+"of 30");</script> Link to comment Share on other sites More sharing options...
Michael34 Posted February 17, 2015 Author Share Posted February 17, 2015 It's a trial in order to the user to get qualification of an exam i want to publish Link to comment Share on other sites More sharing options...
davej Posted February 17, 2015 Share Posted February 17, 2015 Maybe because it is full of errors? Link to comment Share on other sites More sharing options...
justsomeguy Posted February 17, 2015 Share Posted February 17, 2015 Javascript doesn't have a keyword called "golbal". It doesn't have a "global" keyword, either. And did you really define 30 different functions? Why not a single function that just takes parameters to tell it what to do?You doubled up your if statement, your giant string of function calls has some incorrect calls and some misspelled function names, you have a random peice of HTML code after that, you're missing brackets, and you're trying to pass a global variable to a function and still use the global version.You should use your browser's developer console. It will show you error messages like that. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now