Jump to content
Larry Ullman's Book Forums

John B

Members
  • Content Count

    13
  • Joined

  • Last visited

Community Reputation

0 Neutral

About John B

  • Rank
    Newbie
  1. Never mind I got the problem solved, I had to remove the <?php, ?> tags and now it looks exactly like figure A. Thanks for the help HartleySan and Larry Ullamn.
  2. I got the link to work and the text to appear but when the site opens I get the PHP Version 7.1.8 screen that lists the system, build date, etc when all I want is the text "this is the standard html" like in the figure A example on pg 4
  3. My first.php file is stored in a folder called ch01 the path to it is xampp/htdocs/ch01 and I had Apache running when I tried entering the http://localhost/first.php for the script but I still get the 404 error
  4. Hi Larry Ullman, I'm having some trouble on pg 4 step 6 where I run the first.php file. Whenever I run the file using the link http://localhost/first.php I end up getting an error message saying Object not found followed by error 404. Do you have any advice on what I should do. I also stored my first.php file in xampp/htdocs/ch01.
  5. Hi HartleySan, I have been working on this problem and I'm still having trouble. I read your last message about getting NaN when you do number math with strings and what I've been doing so far is trying to convert parts of my if then else statements to strings like regularPay, overtimePay without using number math but I still can't get regualrPay, overtimePay, and the other form values to display correctly when I submit the form. Currently the assignment wants me to use an If statement to test Hours Worked to calculate regularHours and overtimeHours and regularPay and overtimePay. All hours wo
  6. Hi HartleySan thanks for replying to my post. I have been recently updating my code and it seems like I got some things to work but there are other parts of the assignment I'm still having trouble with. You may have read in my previous post that I had trouble displaying the error message for when invalid values were entered, I updated my code so now whenever I type an invalid value my paycheck calculator displays the error message like it should. I also found it helpful to create my if then else statement after declaring my variables. Where I'm having trouble now is in Step 3 f where the assig
  7. Hi everyone, I'm currently working on an assignment for my class that involves me creating a calculator and displaying certain form values with if then else statements. I attached a file to the assignment I'm working on below. So far my problem with this assignment is in ("Step 3, e") this step in the assignment requires me to create an if then else statement for hoursWorked between 0 and 80 and hourlyRate between 0 and 100. The next part of this assignment tells me if the conditions aren't met I must provide an error message, here is where I encountered problems in this assignment. When worki
  8. Hi HartleySan, I have some good news regarding my code. Recently I have been rewriting some of my equations for grossPay, netPay, totalTaxes etc and after testing the code in my paycheck calculator in Firefox it's safe to say I have my code and the paycheck calculator working, all I had to do was observe how you rewrote my code in your previous reply and I eventually did my best to rewrite my equations as I saw fit until I got the code working. Here is my newly updated code and the paycheck calculator is working as it should, thank you for all your all help and to responding to my messages.
  9. Thank you for trying I tested my paycheck.html file in Chrome and seems I got the error to appear in my browser console, here is a screenshot showing the error. I think what I will do is test my page in different browsers for errors and try to reorganize my code better, not only that but I will review how you rewrote my code and see if I can write my equations better using parseFloat in order to get the values to appear.
  10. Hi HartleySan I have another question, I think I am having an issue when it comes to the browser console I am able to pull it up through the Mozilla Firefox menu and then by going to the web developer menu but when I pull up the browser console it doesn't show me the list of errors in my code. I posted an attachment of what it looks like when I pull my browser console in Firefox.
  11. Hi HartleySan I recently made some changes to my code in Notepad++. So far I tried using the parseFloat function that way the values for regularPay, overtimePay and the other values I had would come out as decimals instead of strings but now, it seems like nothing is calculating when it did before and I can't get the values for grossPay, totalTaxes, and netPay to appear either. Here is my code below I have my equations set up as well the parseFloat function for each of my values but I still don't know why nothing is appearing when it should, do you think it has something to do with the way i'
  12. Hi HartleySan, thank you for responding to my question. I think I understand what your trying to tell me based on your reply, in my code both regularPay and overtimePay are presented as strings instead of numbers but my question is how do I convert regularPay and overtimePay into a number? Also, when regularPay and overtimePay are converted into numbers will the values for regularPay and overtimePay still appear in the calculator when I test the code?
  13. Hi Larry Ullman, I’m new to JavaScript and I’m currently working on an assignment for my class that involves me to create a paycheck calculator based on a form I created using Html elements in Notepad++ and elements of JavaScript in a separate Notepad++ document. The form I’m creating uses many aspects presented in chapter 4 of the Modern JavaScript Develop and Design textbook. The problem I’m having with my code is (posted below), so far when creating the paycheck calculator, I’ve got the regularPay and the overtimePay to calculate correctly but my main problem is whenever I try to get the ca
×
×
  • Create New...