dcsimg
www.webdeveloper.com
Page 2 of 2 FirstFirst 12
Results 16 to 18 of 18

Thread: Submit button not working

  1. #16
    Join Date
    Jul 2011
    Posts
    9

    Smile Reply to Submit button not working

    Actually, I love the explanation. I would have been struggling much longer without the introduction of the "object." I placed your name in the comment section with mine, I'm assuming its your screen name.

    I do have a question for the valtoNum() function. Are you taking the option and changing it to an index of the object? I may be misinterpreting that, but I just want to understand it so I can know when to apply it next time and if it would be appropriate to do so.

    lol, you're not babbling, you're explaining which is what none of the tutorials did.

    I am adding a statistics page to it so I am anxious to try your structure. Which is way easier than the pigsty I created. lol.

  2. #17
    Join Date
    Dec 2008
    Posts
    488
    The valToNum() function I wrote for you converts the value of an input to a number. Even though you're typing digits into a field, JavaScript pulls the value as a string, and it needs to be converted before you can use it to do math. You didn't need another function to do so, since parseFloat() or parseInt() accomplish this. As I said I broke out the repetitive parts for illustrative purposes.

    Dont worry though, everyone starts out making their code overcomplicated. Important thing is that you're thinking it through right now. Talking things over with other developers will help you with building your own code style and structure.

  3. #18
    Join Date
    Jul 2011
    Posts
    9

    Thumbs up

    Oh ok. So its easier to retrieve that value now. I'm starting to get the hang of it.

    I completed the rest of the pages so I feel pretty confident thanks to your help. Wish you were my programming instructor for the last 2 years.. .

    I can see how the consistency in the structure is important. I put something in a different order in one of the other pages and the wrong results were placed in the wrong field.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles