[FX.php List] Re: FX.php_List Digest, Vol 65, Issue 5

David Walton dwalton at coresystemsdatabases.com
Fri Dec 4 17:30:56 MST 2009


I have a site with a long form displayed over a tabbed interface.   
Ajax seemed like a natural way to go, so I built it that way.

Individual pieces of user data are saved to FMP via FX whenever a  
single-field change occurs on the web.  No submit buttons, no lost  
data due to lengthy data entry process, no screen refreshes.  It has  
been a busy site this fall and it has worked great.

Here is a very brief of summary:

1)	My ajax/js functions are stored in a file.  So I include that first:

<?php echo '<script type="text/javascript"  
src="tabs_ajax_js_v01.js">'."\n";?>

	This functions include different handling processes for checkboxes,  
textareas, etc.  Can do POST or GET.

	In each case, the url calls my fx handler page plus any specifics  
collected from the onchange function:

...
var url = "tabs_FMP_single_handler.php";
var params = 'crid='+crid_value+'&'+'ts='+tab_suffix+'&'+field_name 
+'='+field_value;
...

2)	My individual fields on the form look like this:

<input
   type="text" name="fieldname" id="fieldname"
   <?php echo $ifReadOnlyP1; ?>
    onchange="postMethod(this,'<?php echo $fieldname; ?>','<?php echo  
$crid; ?>');"
   value="<?php echo $fx_arrayname_dataset['fieldname_inFMP'][0]; ?>"
   size="25" maxlength="25"
  />

etc. ...

3)	The fx handler page is as expected, but simple, simple.  It calls  
layouts which contain a minimum of information.

	I don't want to fill it up too much here.  Thank you for the great  
information you all share here so often.

Dave Walton




On Dec 4, 2009, at 6:20 PM, fx.php_list-request at mail.iviking.org wrote:

> Send FX.php_List mailing list submissions to
> 	fx.php_list at mail.iviking.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
> 	http://www.iviking.org/mailman/listinfo/fx.php_list
> or, via email, send a message with subject or body 'help' to
> 	fx.php_list-request at mail.iviking.org
>
> You can reach the person managing the list at
> 	fx.php_list-owner at mail.iviking.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of FX.php_List digest..."
>
>
> Today's Topics:
>
>    1. Re: Save to database without a Submit? (Jonathan Schwartz)
>    2. Re: Save to database without a Submit? (Bob Patin)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Fri, 4 Dec 2009 15:16:25 -0800
> From: Jonathan Schwartz <jschwartz at exit445.com>
> Subject: Re: [FX.php List] Save to database without a Submit?
> To: "FX.php Discussion List" <fx.php_list at mail.iviking.org>
> Message-ID: <p0620070ec73f480fbba8@[192.168.1.166]>
> Content-Type: text/plain; charset="us-ascii" ; format="flowed"
>
> Thanks, Dale.
>
> We're in agreement.  In fact, I think that you offered the same
> advice years ago, which I embraced.
>
> I'm going to chalk up the idea of midpage quasi-submits as not
> realistic or beneficial.
>
> Thanks
>
> J
>
> At 4:54 PM -0600 12/4/09, Dale Bengston wrote:
>> I do not believe this is a reasonable expectation of HTML. The web
>> is only in a connection mode between a submit click and the next
>> page reloading. After that, it's all happening in the local browser
>> window until the next submit. (Or ajax call or whatever.)
>>
>> I make these assumptions with complex, multi-part forms:
>>
>> 	-The user should not be sent down a series of forms with no
>> idea how many pages there are to fill out.
>> 	-The user might not want to complete the sections in the same
>> order I'd do it.
>> 	-The user might not finish all the sections in one sitting.
>>
>> So, based on this, I design multi-part forms around a "hub" page, so
>> users can see what's left to be filled in, and do it from the bottom
>> up if they like. (Naturally if there are dependencies based on
>> order, the user would be guided thusly.) And I make sure the user
>> can get back to the hub page if they get disconnected for any
>> reason, or bail out on their own.
>>
>> Until all sections are complete and the user officially submits the
>> entire package, the record (or records) are maintained with a status
>> of "Draft" or something like that.
>>
>>
>> On Dec 4, 2009, at 3:43 PM, Jonathan Schwartz wrote:
>>
>>>  Hi Folks,
>>>
>>>  I have a client who is very worried about losing form data should
>>> something should go wrong during a data entry session, such as
>>> dropped connection or so.
>>>
>>>  I have already decided to write to the file upon every page submit
>>> (versus saving to sessionand writing it all at once at the end of a
>>> multi page form).  On a technical level, I imagine that automatic
>>> submits can be accomplished using AJAX, perhaps to a temporary
>>> file. But is this a reasonable practice?
>>>
>>>  Jonathan
>>>
>>>
>>>  --
>>>  Jonathan Schwartz
>>>  Exit 445 Group
>>>  jonathan at exit445.com
>>>  http://www.exit445.com
>>>  415-370-5011
>>>  _______________________________________________
>>>  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
>
>
> -- 
> Jonathan Schwartz
> Exit 445 Group
> jonathan at exit445.com
> http://www.exit445.com
> 415-370-5011
>
>
> ------------------------------
>
> Message: 2
> Date: Fri, 4 Dec 2009 17:20:38 -0600
> From: Bob Patin <bob at patin.com>
> Subject: Re: [FX.php List] Save to database without a Submit?
> To: "FX.php Discussion List" <fx.php_list at mail.iviking.org>
> Message-ID: <CA755634-0859-476B-B764-052A16ACF426 at patin.com>
> Content-Type: text/plain; charset="windows-1252"
>
> Tim,
>
> Not true with IE; when you use the BACK button in IE, your data's  
> gone. At least, that's the case using an SSL cert... don't remember  
> if it's the case without.
>
> BP
>
> Bob Patin
>
>
>
> Longterm Solutions
> bob at longtermsolutions.com
> 615-333-6858
> http://www.longtermsolutions.com
> iChat: bobpatin
> FileMaker 10 Certified Developer
> Member of FileMaker Business Alliance and FileMaker TechNet
> --------------------------
> FileMaker hosting and consulting for all versions of FileMaker
> PHP • Full email services • Free DNS hosting • Colocation • Consulting
> On Dec 4, 2009, at 4:13 PM, Tim 'Webko' Booth wrote:
>
>> No. And you only need a connection at the point of submission  
>> anyway, as opposed to being always connected like you would for a  
>> AJAX submit on every field... I do minutes off-line into a form,  
>> and only press submit when I am back online - even if I forget,  
>> the form fails, and the Back button shows it all again...
>
> -------------- next part --------------
> Skipped content of type multipart/related
>
> ------------------------------
>
> _______________________________________________
> FX.php_List
> FX.php_List at mail.iviking.org
> http://www.iviking.org/mailman/listinfo/fx.php_list
>
> End of FX.php_List Digest, Vol 65, Issue 5
> ******************************************



More information about the FX.php_List mailing list