[FX.php List] [Poll] Which ajax implementation do you use?

Joel Shapiro jsfmp at earthlink.net
Thu Oct 4 13:42:27 MDT 2007


Hey Gjermund

I started using LAJAX because it was so ready-to-use without having  
to know much about JavaScript or AJAX.

I've recently been getting into jQuery, and just discovered how to do  
something that's really pushing me to use jQuery more:

In LAJAX, you need to specify the <div> that the callback will go  
to.  In my current project, I have many divs (cells in a table) that  
can each get refreshed through an AJAX call to the DB.*  With LAJAX I  
needed to either reference by ID the specific DIV in each link, or  
create multiple LAJAX functions -- one for each div, (which I might  
have had to do due to the limitations of a jQuery plugin I was  
using).  Anyway, jQuery has a command called "this", which acts on  
the DOM** element that triggers the action -- so you don't need to  
specify WHERE to do an action... jQuery knows exactly where via its  
use of "this".  On top of that, there are various methods to  
'traverse' the DOM, such as "parents" which goes up the hierarchical  
ladder of the DOM starting at the "this" element and stopping at  
whatever element you specify.  For instance:

I've got something like:

<div class="cell">
   <div class="year">
     <ul class="year">
       <li>
         <a>xyzlink</a>
       </li>
     </ul>
   </div>
   <div class="fall">
      (etc.)
   </div>
</div> <!-- end of "cell" div-->

With the jQuery line:
    $(this).parents(".cell").load("ajaxpage.php");
I can have jQuery load ajaxpage.php into the outside <div> that is  
surrounding THAT PARTICULAR LINK (<a>) that triggered the call.  I  
don't need to specify that cell by any ID.

*My setup is diffferent than the LAJAX sample, which loads results  
into a DIFFERENT div.  Mine reload into their same divs.
**DOM in layperson's terms are the base html elements: <html>,  
<body>, <p>, <div>, <span>, <a>,  <ul>, <li>, etc.

Granted, it's taken me a little time to understand how jQuery works,  
but it is really cool... and I'm only just beginning.

Hope that's helpful,
-Joel


On Oct 2, 2007, at 4:49 AM, Gjermund Gusland Thorsen wrote:

> I use LAJAX( http://www.fm-synergy.com/page1/page1.php )
>
> I have not really looked at any of the other implementations...
>
> Are there anyone who compared them before you started?
>
> ggt667
>
> On 10/2/07, Steve Winter <steve at bluecrocodile.co.nz> wrote:
>> Prototype - http://www.prototypejs.org/
>>
>> Cheers
>> Steve
>>
>> -----Original Message-----
>> From: fx.php_list-bounces at mail.iviking.org
>> [mailto:fx.php_list-bounces at mail.iviking.org] On Behalf Of  
>> Gjermund Gusland
>> Thorsen
>> Sent: Tuesday, 2 October 2007 8:54 a.m.
>> To: FX.php Discussion List
>> Subject: [FX.php List] [Poll] Which ajax implementation do you use?
>>
>> Which ajax implementation do you use?
>>
>> The subject says it all.
>>
>> ggt667
>> _______________________________________________
>> FX.php_List mailing list
>> FX.php_List at mail.iviking.org
>> http://www.iviking.org/mailman/listinfo/fx.php_list
>>
>> No virus found in this incoming message.
>> Checked by AVG Free Edition.
>> Version: 7.5.488 / Virus Database: 269.13.37/1042 - Release Date:  
>> 1/10/2007
>> 6:59 p.m.
>>
>>
>> No virus found in this outgoing message.
>> Checked by AVG Free Edition.
>> Version: 7.5.488 / Virus Database: 269.13.37/1042 - Release Date:  
>> 1/10/2007
>> 6:59 p.m.
>>
>>
>>
>> _______________________________________________
>> FX.php_List mailing list
>> FX.php_List at mail.iviking.org
>> http://www.iviking.org/mailman/listinfo/fx.php_list
>>
> _______________________________________________
> FX.php_List mailing list
> FX.php_List at mail.iviking.org
> http://www.iviking.org/mailman/listinfo/fx.php_list



More information about the FX.php_List mailing list