[FX.php List] Ajax/LAJAX's JavaScript requirements
Tom Sepper
tsepper at dctandt.com
Fri Oct 20 17:50:35 MDT 2006
Thanks Joel. Your hard-code example actually helped me more. I wasn't actually providing input fields and instead generating my own based on my FX query. I've got this functioning beautifully now!
Thanks again.
Tom Sepper
Director of Information Technology
Director's Choice Tour & Travel
P 806.762.6354
F 806.763.7637
tsepper at dctandt.com
www.directorschoicetourandtravel.com
-----Original Message-----
From: fx.php_list-bounces at mail.iviking.org on behalf of Joel Shapiro
Sent: Fri 10/20/2006 3:49 PM
To: FX.php Discussion List
Subject: Re: [FX.php List] Ajax/LAJAX's JavaScript requirements
I haven't tried it, but I would say no, you should not include the
brackets -- they're just to show that multiple fields are optional
and not required to perform the submission. So querying on one field
would be:
<form name="form1" id="form1" action="javascript:LAJAX.post
(url,updatePost,'name='+document.form1['nameField'].value);">
and querying on two fields would be:
<form name="form1" id="form1" action="javascript:LAJAX.post
(url,updatePost,'name='+document.form1
['nameField'].value&'name2='+document.form1['nameField2'].value);">
FYI: "document.form['field'].value" is JavaScript for getting the
VALUE of what's been entered into the specified FIELD on the
specified FORM -- before it's been submitted to the server.
If you were to hard-code the above form submission instead of using
whatever a user enters into a field, it would look something like:
<form name="form1" id="form1" action="javascript:LAJAX.post
(url,updatePost,'name=Tom');">
this would find the same results as when a user enters "Tom" into the
form field "nameField"
HTH,
-Joel
On Oct 20, 2006, at 1:14 PM, Tom Sepper wrote:
> Yes, I meant a single form with multiple fields. I saw his note but
> didn't quote understand its formatting. I'm by no means whatsoever a
> javascript expert.
>
> Do I need the [] around the [&name2=value2...] part is really where
> I'm
> confused.
>
> ---
> Tom Sepper
> Director of Information Technology
> Director's Choice Tour & Travel
>
> P 806.762.6354
> F 806.763.7637
>
> tsepper at dctandt.com
> www.directorschoicetourandtravel.com
>
> -----Original Message-----
> From: fx.php_list-bounces at mail.iviking.org
> [mailto:fx.php_list-bounces at mail.iviking.org] On Behalf Of Joel
> Shapiro
> Sent: Friday, October 20, 2006 3:11 PM
> To: FX.php Discussion List
> Subject: Re: [FX.php List] Ajax/LAJAX's JavaScript requirements
>
> Hi Tom
>
> I'm not sure what you mean by "multiple form fields". Do you mean
> one form with multiiple fields?
>
> In my one quick test so far, both queries (first find Parent, then
> find related Children) were based on only one field each. However in
> Lance's documentation (displayed on the link I submitted below), he
> states:
>
> "NOTE: Params should be name=value[&name2=value2...] format."
>
> I switched his sample URL submission link to a Submit button this way:
>
> <form name="form1" id="form1" action="javascript:LAJAX.post
> (url,updatePost,'name='+document.form1['nameField'].value);">
>
> and I would imagine (though untested) that using name=value
> [&name2=value2...] format would work here just as well.
>
> HTH,
> -Joel
>
>
> On Oct 20, 2006, at 12:30 PM, Tom Sepper wrote:
>
>> Joel,
>>
>> Have you been able to submit multiple form fields? Would you mind
>> showing your code that allowed you to do so?
>>
>>
>> ---
>> Tom Sepper
>> Director of Information Technology
>> Director's Choice Tour & Travel
>>
>> P 806.762.6354
>> F 806.763.7637
>>
>> tsepper at dctandt.com
>> www.directorschoicetourandtravel.com
>>
>> -----Original Message-----
>> From: fx.php_list-bounces at mail.iviking.org
>> [mailto:fx.php_list-bounces at mail.iviking.org] On Behalf Of Joel
>> Shapiro
>> Sent: Friday, October 20, 2006 1:01 PM
>> To: FX.php Discussion List
>> Subject: Re: [FX.php List] Ajax/LAJAX's JavaScript requirements
>>
>> Hi Bob
>>
>> I know you didn't ask me, but I started with Lance Hallberg's
>> LAJAX, at
>> http://www.fm-synergy.com/samples/AJAX/Lajax/
>>
>> He's got a demo at the bottom, and a link to download his scripts.
>>
>> (The demo was a *little* confusing to me at first just because it
>> displays both the Get Array and the Post Array even though you submit
>> just one at a time, but looking at the source code for a little bit
>> and playing with the JavaScript call, I was fairly quickly able to
>> get it to work on my FMP DB, by finding a record through a field on a
>> web page, and then viewing the found record's related child records
>> by a link on the returned parent record -- both without reloading the
>> main page. Very cool, and more than enough to get me started. :)
>>
>> -Joel
>>
>>
>> On Oct 20, 2006, at 7:06 AM, Dale Bengston wrote:
>>
>>> Hi Bob,
>>>
>>> Here's where I started...
>>>
>>> http://developer.apple.com/internet/webcontent/xmlhttpreq.html
>>>
>>> There is a pretty good description of the basic technique and some
>>> bare-bones sample code.
>>>
>>> Dale
>>>
>>> On Oct 18, 2006, at 9:45 PM, Bob Patin wrote:
>>>
>>>> Hey Dale,
>>>>
>>>> Where would you suggest I start in learning AJAX? I'd like to get
>>>> started with it myself...
>>>>
>>>> Thanks,
>>>>
>>>> Bob Patin
>>>> Longterm Solutions
>>>> bob at longtermsolutions.com
>>>> 615-333-6858
>>>> http://www.longtermsolutions.com
>>>>
>>>> CONTACT US VIA INSTANT MESSAGING:
>>>> AIM or iChat: longterm1954
>>>> Yahoo: longterm_solutions
>>>> MSN: tech at longtermsolutions.com
>>>> ICQ: 159333060
>>>>
>>>>
>>>> On Oct 18, 2006, at 4:42 PM, Dale Bengston wrote:
>>>>
>>>>> I am using AJAX extensively in production; it is a major
>>>>> component of my development at this time. AJAX is a great tool.
>>>>> There are some things I will never go back to doing with form
>>>>> submits. And it's wicked fast - even with FM6.
>>>>>
>>>>> Dale
>>>>>
>>>>> On Oct 18, 2006, at 4:19 PM, Joel Shapiro wrote:
>>>>>
>>>>>> Hi all
>>>>>>
>>>>>> I've just been playing w/ LAJAX and it's very cool, but I'm
>>>>>> wondering how practical it is to use in a real site because of
>>>>>> its JavaScript requirements (this would be for anything using
>>>>>> Ajax). I doubt many people these days disable JavaScript on
>>>>>> their browser, but because it's a possibility, it seems you'd
>>>>>> need to test for it first and then provide other options for
>>>>>> when JS is disabled (or provide instructions for the user to
>>>>>> enable it). Also, I notice that LAJAX requires JavaScript 1.2,
>>>>>> but that seems likely a non-issue since that came out in 1997
>>>>>> (or is it?).
>>>>>>
>>>>>> How are people dealing with this? Anyone using it in production?
>>>>>>
>>>>>> Thanks,
>>>>>> -Joel
>>>>>>
>>>>>>
>>>>>> Joel Shapiro - FileMaker Pro Database Design
>>>>>> ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
>>>>>> joelshapiro at jsfmp dot com
>>>>>> http://www.jsfmp.com
>>>>>> 415-269-5055
>>>>>>
>>>>>>
>>>>>> _______________________________________________
>>>>>> 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
>>>>
>>>> _______________________________________________
>>>> 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
>>
>> _______________________________________________
>> 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
>
> _______________________________________________
> 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
_______________________________________________
FX.php_List mailing list
FX.php_List at mail.iviking.org
http://www.iviking.org/mailman/listinfo/fx.php_list
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/ms-tnef
Size: 6327 bytes
Desc: not available
Url : http://www.iviking.org/pipermail/fx.php_list/attachments/20061020/077c27b3/attachment-0001.bin
More information about the FX.php_List
mailing list