Jump to content


  • Content Count

  • Joined

  • Last visited

Everything posted by jdubya

  1. Hi @dsonesuk when i added your correction to my code it threw out all of my entrys, i started to get undefined on the course codes at the end and my GPA calculator at the end started to show all sorted of random numbers below is the whole code to give you a better understand any thoughts? <script> var coursecode =["ACC1101","ACC3118","ACC5202","ACC5213","ACC5216","ACC5502","ACC8000","ACC8003","ACC8105","AGR2302","AGR3303","AGR3304","AGR3305","AGR4305","ANT1001","ANT2005","ANT2008","ANT3006","BCA3000","BCA4000","BCA8003","BIO1101","BIO1103","BIO1104","BIO1203
  2. aHHHH You are a life saver thank you so much! and with your table help earlier too. Really appreiate it @dsonesuk
  3. Sorry for the confusing, so if the user inputs a grade value between 3-7 its a valid number and then the code moves on, but i now want to only add in the decimal number 1.5 to the valid number list. I just added in your code change but it still came up invalid. Any help would be great @dsonesuk
  4. Hi, Im trying to Validate the numbers a user inputs, but im having trouble getting it to do both intergers and floats in the same validation, currently i can do the numbers between 3-7 but i want to add the decimal number 1.5 to this list, below is my code can anyone help? var input_gradeValue = parseFloat(prompt("Please Enter your grade for: " + input_coursecode)); while((input_gradeValue < 3) || (input_gradeValue > 7) || (input_gradeValue == "1.5")) { alert("The grade you entered is not valid, Please Try Again!"); var input_gradeValue = p
  5. Im sorry ive tried to make the changes you suggested but cant seem to get the table to work ive added the closing tag but its still not working. Im extremely new at this so some concepts are a little hard for me to imagine. Below Is what i did but kept the document.write as thats all ive been taught at the moment and just wanted to stick with that, i know its ancient. @justsomeguy // Table Listing Course Codes Enters and Grades for (var i = 0; i < courseCodeArray.length; i++) { document.writeln('<table border="1">'); document.writeln('<tr>'); do
  6. sorry when you say outside the loop im not sure exactly what you mean? im quite new to javascript/programming, to move this table to outside the script section but doesnt seem to work, apologies for my lack of knowledge. Any help would be great @dsonesuk
  7. Hi, just wondering if anyone can help me, im trying to display my table above the statisics of the users input, but all it seems to do is split the table. Not sure what im doing if anyone can give me some insight that would be great, thank you. <!DOCTYPE html> <html> <body> <p>GPA CALCULATOR</p> </br> <p>Course Code - Grade Value</p> <p>Statistics</p> <script> //List of Course Code for Validation var coursecode =["ACC1101","ACC3118","ACC5202","ACC5213","ACC5216","ACC5502","ACC80
  • Create New...