Category Archives: Javascript

Incomplete Execution of Callbacks on JQuery POST

In JQuery, you can use the $.post() function to make a client-side AJAX request (more info here). If you want to POST JSON objects to your server, you basically want to do something like this: $.post( URL, [data], [CALLBACK FUNCTION], “json”) In the project that I’m working on, I’m rendering a table using JQuery + [...]

Also posted in Tech | Tagged , , , , , , | Leave a comment

Passing Parameters to a Function on HTML Events

Let’s say I have some function foo that needs to be called when some HTML element is clicked: function foo(a, b) { : : : } : i = 100; j = 200; element.setAttribute(“onclick”, “foo(i, j)”); In the example above, the Javascript interperter will see the line element.setAttribute(“onclick”, “foo(i, j)”); and automatically figure out that [...]

Also posted in Tech | Tagged , , , , , , , | Leave a comment

CSC309 A1: kääntää Translations

One of the more fun courses that I’m taking this semester is  CSC309: Intro to Web Programming.  Although I do a lot of coding in general, I’ve actually never worked with Javascript or other web technologies.  Sure, I’m using WordPress right now, but Bluehost is nice enough to have one-click installs! For our first assignment, [...]

Also posted in Tech, UofT | Tagged , , , | 1 Comment