[FX.php List] AJAX and FX.php

Marisa Smith marisa at datasmithconsulting.net
Wed Oct 19 06:18:37 MDT 2005

Since Dale and I did the proof of concept in July, we have both implemented
AJAX on a couple of projects and when the data is coming from FM7 it is VERY
fast - The first few times it worked, I thought it didn't because the
response was so quick!

Now, I'm using AJAX primarily as a substitute for opening a separate window
to add data to a related record.  In one of my contact tracking solutions, I
use it to add contacts to groups (creating a record in a related table) and
then using javascript to write back the updated table to the page so you can
see it "building" without refreshing the page.  I also use a combination of
JS, CSS, and a modified "yellow fade" method to highlight the row that has
been added/edited when the table redraws.  This seems to help with the
dilemma Dale mentioned below about giving the user feedback that something
has actually happened.

The problem I struggle with now is that it Is rather complicated to get
implemented - especially if you want two instances of ajax on one page - I'd
really like to write a function to accomplish all this without having to
edit 2 JS files and 2 PHP files to get it to work.  I'll check out the SAJAX
thing - maybe it will be the answer!

To reiterate what Dale said, don't be discouraged by the speed of the
example he posted - it's much faster when data is coming from FM7.  I'll see
if I can get an example posted this week sometime - everything I've
developed so far is on "intranet" sites that I can't allow public access to.


On 10/19/2005 12:20 AM, "Dale Bengston" <dbengston at preservationstudio.com>

> Hi Dan,
> I have it working. I have a time-tracking solution for a graphic-
> design firm that's based on FMSA and FX.PHP. Users click on a grid
> (fancy JavaScript) to register quarter hours of time spent on various
> projects. Any modified lines of time are automatically saved out at
> intervals to FMP via AJAX without having to "submit" the page or
> refresh.
> The AJAX JavaScript passes information to a server-side PHP page,
> which includes the FX.PHP call to FMSA edit a record, or add a new
> one if necessary. The PHP page returns the record id to the
> JavaScript so it can be added to any new lines of time so they will
> be edited the next time around.
> Things I learned along the way...
> 1. AJAX creates a new set of UI challenges. The typical user
> expectation is that to commit data to a database, you submit a form,
> wait, and get a new page. It was hard to convince some users that
> something is happening and their changes were saved without
> refreshing the page. I had to develop some icons to provide feedback:
> time has not been saved, time is getting saved, time is saved.
> 2. I wasted a lot of time trying to adapt the AJAX code posted by
> others. I would have been better off to just do my homework up-front
> on XMLHttpRequest and write my own from scratch.
> 3. When I first had the idea to build this time-tracking solution
> using AJAX, I thought I'd use AJAX everywhere. Now, I'm not so sure.
> It has its places, but it's not a substitute for every conventional
> site I develop.
> Back in July, Marisa Smith and I cooked up a proof of concept of
> using FileMaker data and AJAX to populate a "Google Suggests" type
> drop-down menu. You can see it at <http://www.streamline-studio.com/
> AJAX/index.php>. It's a really rough page, and it's terribly slow
> because of where it's getting its FMP data. But it works. This one is
> built on the work of others; I wish I had time to re-do it from
> scratch. Did I mention it's ugly and slow? Really. Ugly. Slow.
> Hope this helps,
> Dale
> --
> Dale Bengston
> Streamline Studio, LLC
> 2822 Mason Street
> Madison, WI 53705
> 608.212.8151
> dbengston at streamline-studio dot com
> www.streamline-studio.com
> On Oct 18, 2005, at 1:33 PM, DC wrote:
>> Anyone working on integration of FMP/FX.php with the new-style Web
>> 2.0 (aka AJAX) Client-Server architectures?
>> What have you found/built?
>> Thanks,
>> dan
>> _______________________________________________
>> 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

Marisa Smith, President
DataSmith Consulting, LLC
9206 Huron River Drive
Dexter, MI 48130
Phone: (734) 426-8077
Fax: (734) 426-7069 ­ NEW!
Filemaker Solutions Alliance Associate Member

More information about the FX.php_List mailing list