Zend Framework is a very robust PHP Framework. Using jQuery (and most other Ajax Frameworks) can be used with Zend Framework in a variety of ways. In this post, I will discuss the two most common ways that I use jQuery with Zend Framework.
Tag Archives: Json
ui.imFeedBack – A JQuery UI Feedback Widget
Ajax, JQuery, UI WidgetsWhen the web20.digitalvilliage site was nearly complete, I wanted to add a contact form. I like the feedback tabs that I have been seeing on websites recently (displayed on the right or left of the page), so I decided to build one. I was already using a JQuery UI theme on the site, so I decided to create a JQuery UI widget so that the color scheme of the feedback form would match the color scheme on the site.
This ui.imFeedBack widget is extremely versatile. The feedback tab can be placed on the right or left and can even be displayed as a dialog.
AS3: A URLLoader Class
Actionscript, FlashI’m working on a Flash/AS3 application where I am loading various types of files (images, xml, etc). After writing the same code over and over again, I decided to create an AS3 class to use with my application. This class will load image, swf, text, xml, html, stylesheet, json, and sound files.
Multiple Combo boxes with YUI and CakePHP
Ajax, CakePHP, YUIAs a developer, I hate writing similar code for the same process over and over again. Just like highly optimized database design, developers should always try to write code as efficiently as possible.
I’m working on a project where I use YUI and CakePHP to fill multiple combo boxes on a page using Json data. At first, I wrote separate code with the same functionality for each combo box. Every time I needed to change the functionality, I had to change it for each combo box. After doing this multiple times, I decided to combine the functionality on both the front-end (YUI) and the back-end (CakePHP).
YAHOO.util.Connect, CakePHP, Json Data
Ajax, CakePHP, YUII’ve been upgrading an Intranet application that I created for a client. I created the front-end using YUI (Yahoo! User Interface Library) and I am working on migrating the back-end to CakePHP. After setting up CakePHP, my first step of integrating YUI with CakePHP is retrieving data ajaxally. The application was already using YAHOO.util.Connect to retrieve the data, but I had to change my parsing code due to the format of the Json data that is returned by CakePHP.
JQuery 1.4, YUI: JSON ParseError – Quotes Required
Ajax, JQuery, YUISomeone just sent me a message asking me to update my imBannerRotater plugin because they were receiving a parseerrormessage with JQuery 1.4.
I tested the plugin with JQuery 1.4 and I too received the parseerror message. I knew immediately that the problem was with the Json record that was returned via an ajax request. Looking at the json record, I noticed that quotes were placed around the value, but not the name/key, so I added the quotes:
// originally {name: "joneil.jpg", url: "http://www.imdb.com/character/ch0005968/"} // changed to {"name": "joneil.jpg", "url": "http://www.imdb.com/character/ch0005968/"} |
I tested and no longer received the parseerror message.
The reason I knew that the error was due to the json record is because I ran into a similar problem with YUI last week. I received a parse error with a json record because I used single quotes rather than double quotes. I thought it was odd (and I was a bit displeased).
Knowing about the problem with YUI and single quotes, I tested json object above using single quotes:
{'name': 'joneil.jpg', 'url': 'http://www.imdb.com/character/ch0005968/'} |
I again received the parseerror message. So you must use double quotes. I went back and read the Json specs. It mentioned placing double quotes around the value, but did not mention anything about placing quotes (double or otherwise) around the the name/key. But YUI and JQuery 1.4 both require it so it must be required.
Javascript: Inversely Proportional
Javascript, JQueryI’m working on a project that uses the JScrollPane JQuery Plugin to scroll a number of records. My client wanted the scroll bar to have a variable height (like most modern scroll bars). The height of the scroll bar should be determined by the number of records – the height should decrease as the number of records increase. So the scroll bar height is inversely proportional to the number of records.
JQuery Plugin: imGoogleMaps-0.9.2, Custom Marker Icons
Ajax, API's, Google Maps, JQuery, pluginsI recently had to update my imGoogleMaps JQuery Plugin due to problems that arose from the Geocode request rate limitations. As I researched the problem, I delved even more into the Google Maps API. Although this is a minor release, I decided to add custom marker icons to this version. Now you should be able to easily add custom markers to your Google Maps without having to worry about creating the underlying Google Maps API code – JQuery and the imGoogleMaps plugin helps you create a customized map in the fraction of the time. I also added the ability to display a phone number and a description for each address in the infoWindow.
Validating Forms With CodeIgniter and JQuery
Ajax, Codeigniter, JQuery, pluginsI created a JQuery Plugin, imValidateForm. As the name suggests, the plugin is used to validate forms. In this post, I will discuss how to use the imValidateForm plugin with CodeIgniter.
Google Maps: Using JQuery to Display Multiple Addresses
Ajax, API's, Google Maps, JQueryI have recently been updating the JQuery imGoogleMaps Plugin that I created earlier this year. The new version of the plugin will display multiple addresses on a Google Map. I’ll discuss the updated version of the imGoogleMaps plugin in another post. In this post, I’ll discuss how to use JQuery to load multiple addresses from Json data.

