Skip to content
David Turner edited this page Nov 29, 2015 · 13 revisions

Instructions

  1. In your cse322 workspace, create a folder named ajax2. Place all the work you do for this assignment in this folder.
  2. Use the GitHub Markdown API to perform the following functionality for users. The user types in markdown into a textarea element. When the user clicks the transform button, Javascript submits the text to the raw mode GitHub markdown API and renders the result in the Web page. (Do not display the result in a popup window.) Make requests to the following url: https://api.github.com/markdown/raw.
  3. Send me an email before the assignment deadline with a link to your workspace. Write ajax2 assignment in the subject line of the email.

I've left out a lot of details to give you practice with research. However, here is one hint that might help you solve the problem: Suppose result is the id of a div in your page. In this case, you can insert the HTML returned from Github into your Web page using the following.

document.getElementById('result').innerHTML = the-result-string

Recommendation

Based on his experience with this assignment, Kristian Howard recommends the W3Schools tutorial on AJAX.

Clone this wiki locally