JustTheWord API Sample Code
jtw + Wordle mashup
This sample code shows html and javascript (AJAX) to retrieve collocations from
jtw and send them to
Wordle to make a nice picture.
The code does this:
- gets an input word from the user
- retrieves collocations from the jtw API, using a JSONP request (using the jQuery.js library)
- transcodes the data returned into Wordle input, keeping the first 15 combinations
- injects the data into a Wordle form and submits the form
- which opens the Wordle App in a new window
Enjoy!