When I blogged about whether or not you can use too much AJAX on your website. The short answer was no; with one caveat being that you must not lose the user interaction experience. In this scenario I’m referring to the back button. If the user has “felt” like the content changed, they are likely to click the back button to return. If they do this, it’s important for them to “go back” to where they “think” they were and not the last page that was loaded without AJAX and simply relying on Javascript events! I’ve put together a quick example of how to do this. (more…)
Category: AJAX
-
AJAX, can there be too much?
Like any problem, there is no one right solution. There are always many different solutions that work for different reasons. Some solutions require the best solution; some solutions require the more optimized solution; other solutions just need to “get done”.
As a developer, I like AJAX. It’s easy to develop and it makes for a really good user flow. No more loading new pages to add comments or view the description of a product. It can all be done with a smooth interface and less waiting.
But, can you have too much AJAX?
(more…) -
How to add comments with AJAX in CakePHP
In today’s article we are going to create a very basic blog that allows people to create a post and posts comments on that post via AJAX. We are going to keep it extremely basic and just focus on that actual AJAX functionality.
Ready? Let’s begin. We are going to start by creating two database tables: posts and posts_comments. Also, I’ve got a very simple example of this same feature using Node.js tutorial. Below is a sample create statement for the posts table: (more…)
-
AJAX Select box in CakePHP
When I created my first personal CakePHP web site, this was something that had me quite frustrated. I struggled and struggled to figure out and understand how to do a simple “if I change this select box, how can I populate another one”.
I had previously done this a million times in other languages with a simple Javascript onchange() function that would do my AJAX and populate my other select box.
To solve this problem, I checked CakePHP’s web site and did not find anything useful. Don’t forget this was almost a year ago, I find the web site has come a long way now. Because I couldn’t find a could example, I did the next best thing, I dove write into the form helper and ajax helper. Shortly after, I found enough information to start my trial and error process.
Excellent, now we are getting some where. Now that we know this, let’s create our two select boxes and make our second one populate through AJAX. (more…)
-
Drag and Drop with AJAX Example
At my work it’s quite clear to me that a lot of people have difficulty with both AJAX and Javascript drag and drop event functionality. In this article, I thought I would provide a realistic and simplistic example of how to accomplish both AJAX and drag and drop together.
By the end of this article you will be able to create an extremely slick content management system that works really smoothly. (more…)