Technology Blog

Widgets

Archive for the ‘AJAX’ Category

jQuery slideUp stops working in 1.3.2

After testing across a couple browsers and having some of them work. I figured there must be a bug in jquery. Turns out I was correct. Here’s the quick fix. Please make sure to backup your .js files before making any changes to them. Use these updates at your own risk. I will post the related jquery references at the end of this post. Make sure to check which version of jquery you’re using first. Generally, there is the normal version and min version. I do not have the fix for the compact version listed.

For the “normal” version:

Find the code:
return elem.offsetWidth === 0 || elem.offsetHeight === 0

Change to:
return elem.offsetWidth === 0 && elem.offsetHeight === 0

For the “min” version:

Find the code:
return T.offsetWidth===0||T.offsetHeight===0

Change to:
return T.offsetWidth===0&&T.offsetHeight===0

This is the ticket regarding the issue:
http://dev.jquery.com/ticket/4374

And here’s the fix for it:
http://dev.jquery.com/changeset/6282

That’s it!

Simple AJAX POST with MooTools

Well, I spent most of today getting my feet wet with AJAX. I had a hard time deciding which framework to use for AJAX. There are so many out there, and I’m sure you have your own opinion on which is best, but that isn’t the topic here. I really liked mootools because of their effects. Sure, jquery and prototype have better documentation, but I think I’m sticking with mootools for my AJAX needs for the present time. This mootools javascript file is the entire core along with all the effects. It could be a much smaller file, but for testing purposes, it will do.

Speaking of documentation, it was really hard to find a simple example using POST as the method. After lots of searching, I decided to give it a go. I hope this simple example sheds some light.

I plan on doing a more advanced example in the near future that will do a MySql call and update a table result.

This example is for the purposes of mootools only and assumes understanding of the rest.

Demo

On the “demo” link above, you will find the source code.

Comments welcome. Enjoy!

© ZADRO Solutions, Inc. All Rights Reserved. Disclaimer | Privacy Policy
RSS Facebook Digg Delicious Stumble Upon Twitter