Blog week 12
This week is the VERY LAST WEEK before the website project is due.After last week's massive construction, our basic core technical part is done and we are building upon the basic core code.
I firstly made a list of what we should be doing, found solutions to each of them and ticked them off one by one.
The list includes toggle function of the icon (info from database), get modal button working on each info window, modal pop-up window content design, database retrieved info extension and group online zone http request fix.
And the biggest technical problem i met this week is the info integration with pop-up window. There is a on click event function with the for loop but the for loop number appeared to be meaningless in the inner function. And this problem trapped me for days.
And i eventually solved this problem by creating a const (not var) in the for loop before function and pass the const into this function. Everything just worked out!
Afterwards, i looked up the databases and added new tuples (namely new info) in the local storage so that i can put them in display.
When i tried to put the website online, the google map broke down completely and i have to ask help from tutor for this one, turns out that i need to change maps.google.com into maps.googleapis.com. But then i met this problem of getting secure http request, which is solved by my adding a 's' in each of the string that contains 'http'.
After all this, i, together with Oscar finished the problem that we cannot close modal windows. and we spent a whole afternoon discussing it, only to find that we solved it with one line of code. Using jQuery, we used .remove() instead of .hide() and it just worked!
REFLECTION:
Debugging and fixing problem are always the hardest part, and i had a deeper understanding of this week's struggle. A lot of debugging problem is by trying to find alternative way of doing one thing. Lesson learned!!!





Comments
Post a Comment