seeschweiler / jsissuetracker

JS Issue Tracker
50 stars 71 forks source link

Nothing happens when i press add button #1

Open onurtore opened 7 years ago

onurtore commented 7 years ago

I copied your source code but nothing happens when i press the add button

nightMue commented 6 years ago

@onurtore If you copied their source code, make sure you have a file called chance.js in your project with their code inside that. Another option is to have the following in your index.html before the end tag for the body:

<script src="http://chancejs.com/chance.min.js"></script>

This allows you to not need the additional file.

I hope this helps, their code worked for me so without seeing what you did its hard to debug.

conorkelly86 commented 6 years ago

I'm having the same issue with the Add button. Added the src for chance.js and the actual file in too but still nothing?

nightMue commented 6 years ago

@conye9980 This could not fix it but I did notice something in there main.js file. In the fetch issues method, the variable that is the location of the issues div. The variable is declared as "issuesListe". This variable is not used anywere and further down in the function is uses a undeclared variable called "issuesList". So try removing the "e" from the end of the name?

conorkelly86 commented 6 years ago

Yeah I noticed that during the tutorial but still no luck.

nightMue commented 6 years ago

@conye9980 I am not sure without looking at the code. I just created a new project and copied all their source code into the files, added the script tag with src for chance, and it worked fine for me.

conorkelly86 commented 6 years ago

Have you got your code uploaded? In your jsapp01 folder, do you just have index.html main.js chance.js?

nightMue commented 6 years ago

I do not have my code uploaded. And in my project folder I have index.html, main.js (that is all you need if you have the script tag with src chance). It doesn't hurt to put another file chance.js in there with the source code from here.

conorkelly86 commented 6 years ago

image

conorkelly86 commented 6 years ago

image image

conorkelly86 commented 6 years ago

This is my code. HTML and Body/Head tags cropped cos of space. and two } } at the end of main.js

nightMue commented 6 years ago

In the main.js one, the saveIssue function, you declare a variable called issueSeverity. You are assigning it to the location of the severity input and in your index.html you have it called "issueSeverityInput". So for this variable, change to document.getElementById('issueSeverityInput)'.value

I believe this could fix it, I know that this will break the function.

nightMue commented 6 years ago

A side not too, in your index.html you can assign the select in the severity form to the class form-control as each individual option is inside that select. It will give you the style you are looking for. So it should be this:

``

conorkelly86 commented 6 years ago

I've just spotted the problem, I took both codes and found the differences between two. In my code on line 60 of main.js, I didn't have in a fetchIssues(); So its working! Thanks mate!

subinvelleringatt commented 5 years ago

I have nothing listed in UI,when i click Add.

myjspjt.zip