Welcome, once again, to the New Year! As some of you may know, my long term goals around programming are continuing strong into this year, 2018. I have begun running through the Basic Algorithm Scripting on Free Code Camp. If you haven't heard of FCC, and you want to learn html, css or javascript, head over their now!
But after writing my function I felt confused. How would this work on a website? I couldn't just paste javascript anywhere I want.... I would have to have a form field, a submit button, and some where to display the output.
I pulled up the training grounds to see how far I could get.
The first thing I learned was that Django only can handle a single content block per page. I had added another, but I quickly deleted it after this error message. What I really needed there was
<div class='row'>
In order to separate what I had done before with what I was doing now.
I also learned that Django takes a JS block, below the content block to abstract the Javascript from the section. More appropriately would be to call the javascript from another file, which I will look into doing in the next development.
My good friend kit.andres came over and I immediately bombarded him with questions about why my variables weren't playing well together. He helped me add the second function that takes the input on submit and feeds it into my original function. He also reminded me how to call id's properly in jquery.
I am very happy that I have not only a place to put the code that I work out, but also friends and a community to share it with. Questions, comments or requests are very welcome in the comments section!
Let's live this year as if were the best year EVER!
Love and Light to All!
Posted on Utopian.io - Rewarding Open Source Contributors