Getting input fields to go to blank

I’m getting a few error messages on codepen on HTML, CSS an JS windows that I don’t get on my editor, but I can’t see any problem. At any rate, the reason I’m here is I’d like some help with a home project, I got the JS to run adding expenses and income to my report, but after I click add I’d like for the input field to go to blank again. Thanks again for the help.

https://codepen.io/srandall/full/MWjOrzb

Hi @srandall!

I experienced the same thing with codepen.
I started seeing these messages.

But for resetting the input field maybe you could try adding this at the end of your add income function

document.getElementById('income').value='';

First, on line 40 you have an extra space:

<tbody id="table-body ">
                     ^

Regarding clearing inputs, you can call .reset() on the form element, to clear all the inputs the form contains.

So for the “incoming” it would be:

document.getElemntById("incoming").reset()

And for the expenses you’ll need to wrap inputs in a form element and do the same.

Thank you guys!! It’s cool how much more I understand what I’m learning on FCC by doing this pseudo ‘real world’ apps!!

At the sake of being a pest, let’s say I want all my income information on one page, expenses on another, then a page to sum up all information on another page, how do I navigate between the three? I know the “href” will take me somewhere, and the “_blank” will direct me to another page. FCC just told me thus far how to go to different URL’s but what if I want to navigate between internal pages without a URL?

I guess you could just create separate html pages for income, expenses and the sum of all information.

You can just have one main js file linked to each one of the html files.

Then have the same navigation bar for all of the html pages where the user can go back and forth to the section pages on the site.

For that, the href would just be the default target="_self" not _blank