Contents tagged with JavaScript

  • Vlogging Web Development

    The web site I've been working on, Vloggerheads, will be opened to the public tomorrow. You can view the videos and blogs but you won't be able to comment or post videos unless you request membership and are approved. You might want to check out the video of the shrine that was built to me or the many videos thanking me for adding much needed features to the site. LOL

  • JavaScript XML Cheat Sheet

    Recently I was working on some complicated JavaScript to nest unordered lists and list items to match an Atom feed's XML structure. I had to spend an entire day researching JavaScript's XML parsing capabilities because there is no place on the Internet where this information is gathered to my satisfaction. I created a JavaScript cheat sheet on XML for my notes. I thought I would share it with you in order to get some feedback for improving my notes. Let me know if you know of a JavaScript library that eases the pain of working with XML in JavaScript. jQuery is somewhat useful for this if you use its DOM selectors on an XML document instead of the web page document. var entryNode = $('entry',xmlDoc).eq(5);

  • File Download Progress Bar

    Yesterday I added a progress bar to my ASP.NET page for downloading YouTube videos. There was no visual indication that the download was taking place because the page just appeared to be taking a long time to load. I would have to open the download file location to verify that something was being downloaded.

  • I Pounce On The Pownce API

    The microblogging site http://www.pownce.com/ has opened to the general public so I decided to give their API a try. But the main point of this blog post is to dispute the assertion that JSON is "easy for humans to read and write". It is not easy to read! JSON is a mess of curly braces, brackets, and quoted strings that is even more difficult to read than XML. I had considerable trouble working with the JSON data that Pownce provides because it seems to be nonstandard and requires the use of array indices which aren't usually needed. At first I tried to determine the data's object model by loading the XML version into XML Spy and finding the XPaths for a value. This was only slightly useful. Then I found a JSON Viewer on CodePlex which proved to be extremely helpful.

  • Amazon Wish List In JSON

    Today I explored some alternative JavaScript coding methods to make it easier to dynamically create DOM elements. I used jQuery and the jQuery Plugin, FlyDOM, to work with the Amazon web service API. I bought the book Amazon.com Mashups by Francis Shanahan from the Computer Books Direct club which is closing and selling books cheap. I have not read the book yet but there is a chapter on converting Amazon data directly into JSON using XSLT (hmm, interesting) and it actually covers several other APIs and the technology behind mashups. There was some mention of Amazon wish lists which attracted my attention because I use wish lists to save books that I come across which I may want to buy some day. In other words, this is personal data that I am actually interested in.

  • JavaScript Libraries

    I've been working a lot with JavaScript lately so I decided to check out all the JavaScript libraries that are available. Many of these libraries have useful utility methods and modules for JSON and AJAX. There are six libraries that I intend to explore; the Microsoft AJAX Client Library (I need to see what was added in 3.5), the Prototype JavaScript Framework, the Dojo Toolkit, MochiKit, and the Yahoo! User Interface Library (YUI), and jQuery.

  • Developing Web Widgets

    Last night I finally finished the improvements to my xml2json generic handler which were required to develop a Stickam widget. Since I am sending the URL of the feed as a query string value to the generic handler it was necessary to deal with ampersands in the feed's URL without screwing up the query string. So I added a line to replace the | character with the & character. If I have a feed with an ampersand in the URL I'll just send it with the | character instead. Trace listeners don't seem to work in generic handlers so I added code to write the feed URL and the JSON string to a log file for debugging purposes. The Stickam players in the XML were causing invalid JSON syntax because they were not getting null values. I am not interested in that information so I used RegexBuddy to come up with the regular expression to replace them with empty strings. I came across the infamous "invalid label name" error so I added parentheses around my JSON string. The last thing I did was add XML comments for the method that actually converts the XML to JSON because this code should be replace when a more reliable algorithm becomes available: