need another help. I was stuck on this "problem" for four days already, it's getting frustrating because the project I'm working on is easy, It should be easy.
Title speaks for Itself. I'll list some things I've tried... Replacing e.preventDefault()
for return false
and/or e.stopPropagation()
, not working. Adding this.submit();
at the end, not working. Tried using new .on
syntax instead of .submit
, not working. And that's It.
If somebody has any idea, please. Thank you in advance, even for trying.
$("#allRuns").click(function () {
fetchBookmarks();
$("#edit").click(function () {
$("#container").html('<form id="allForm">' +
'Distance: <input id="allDistance" type="text"><br>' +
'Time: <input id="allTime" type="text"><br>' +
'<input type="submit" value="Edit">' +
'</form>'
);
});
$("#allForm").submit(function (e) {
/* var bookmarks = JSON.parse(localStorage.getItem("bookmarks"));
for (var i = 0; i < bookmarks.length; i++) {
if (bookmarks[i].time == time) {
console.log(bookmarks[i])
};
}; */
console.log("H")
e.preventDefault();
});
});
For some reason, here on web is weird spacing, hope It make sense. Seems like there Is tab missing. Probably my mistake, still new here and don't know how to use this properly.
Basically what I need is to see whatever response in console, console.log("H")
doesn't return anything.
In any case. There is a link on GitHub with a right file if that's better for you.
https://github.com/ovy1448/MyRun/blob/master/js/main.js
The problem is at the bottom. If you need to know more, just ask. Thanks again.