After fixing the bugs from last week’s work, I proceed to automate simulation on gutter click. Before I start to code, i studied about jQuery and learn about how requests work. Then, I started off with my first task of the week, that is to retrieve a file from the back-end. This task became easy with the help of an existing REST API. I use a jQuery Ajax method to interact with the REST API and then the file will be available in the response.

 

Next, I tried to automate the simulation. At first, I did a nested Ajax method to send the file I retrieved to the simulator. However, I soon found out that this might not be a good way because jQuery serializes the data by default. I tried to modify the javaScript codes in the Ajax method to fix this issue but I ended up spending around two days on this but still not succeeding. Realizing that I have no time to waste, I asked Dr Shawn for his opinion. He suggested me another method of getting the retrieved file to the simulator. I then changed my plan and follow Dr Shawn’s method.


0 Comments

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.