Open onurtore opened 7 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.
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?
@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?
Yeah I noticed that during the tutorial but still no luck.
@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.
Have you got your code uploaded? In your jsapp01 folder, do you just have index.html main.js chance.js?
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.
This is my code. HTML and Body/Head tags cropped cos of space. and two } } at the end of main.js
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.
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:
`
<option value="Medium" >Medium</option>
<option value="High" >High</option>
`
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!
I have nothing listed in UI,when i click Add.
I copied your source code but nothing happens when i press the add button