[FX.php List] Editing multiple records
Dale Bengston
dbengston at preservationstudio.com
Thu Aug 10 14:00:45 MDT 2006
There are as many approaches to AJAX as there are members of this
list. If you want to roll your own, I would start with the basic
technique of making a request as detailed on Apple's Developer
Connection site:
http://developer.apple.com/internet/webcontent/xmlhttpreq.html
Just picture the URL passed by their sample function as a file on
your server, with GET parameters. The php file has an FX query in it
and the parameters are your record data to make the modification.
There's a whole heck of a lot more to it, like how to determine which
records have been modified in your list, and how to handle
validation, how to loop through the modified records and how to
handle errors coming back from the AJAX call.
Probably raises more questions than it answers....
Dale
PS You can have the result of the AJAX call re-draw the values on a
popup too.
On Aug 10, 2006, at 1:44 PM, Rob H. Christensen wrote:
> Hi Dale
>
> This AJAX function probably is something written already. Where do
> I get
> more information?
>
>
> To come back at the complication I wrote about (Two forms and only
> one per
> record):
> There is a solution with a pop-up for this. It requires an extra
> loop, but
> it does give a possibility to navigate to the job by means of a
> pop-up
> list:
> At the top of the list I used:
>
> </td>
>
> <form name='job' method='POST' action="index.php">
>
> <input type='hidden' name='area' value='XXX'>
> <input type="hidden" name="Jobnummer" value="<?PHP echo
> $findTegnerData['Jobnummer'][0];?>">
>
> <input type="hidden" name="jobID" value="<?PHP echo
> $findTegnerData['ID'][0];?>">
>
> <input type="hidden" name="BRUGER" value="<?PHP echo $BRUGER;?>">
>
> <input type="hidden" name="TEKNER" value="<?PHP echo $TEKNER;?>">
>
> <td>
>
> <select name='Jobliste' class = 'small'>
>
> <option value="0">"Til job</option>
>
> <?PHP
> foreach($findTegnerResult['data'] as $key=>$findTegnerData){ ?>
>
> <option value='<?PHP echo $findTegnerData['Jobnummer'][0]; ?>' ><?
> PHP echo
> $findTegnerData['Jobnummer'][0]; ?></option>
>
> <?PHP }?>
>
> </select>
>
> input type="submit" name='submit' class='small'value="Gå!">
>
> </td>
>
> </form>
>
> This gave an easy navigation. The next step is to make the "big"
> form with
> the list of jobs. (or a script, which is able to do multiple edits...)
>
> Rob
>
>
> On 10/08/06 19:23, "fx.php_list-request at mail.iviking.org"
> <fx.php_list-request at mail.iviking.org> wrote:
>
>> Another way to approach this is to pass the record information to an
>> AJAX (JavaScript) function that edits the records in succession
>> without reloading the page. This is a great method for allowing edits
>> to a list of records without having to reload the page for every
>> record, or run FMP looping scripts on the server side. I'm using this
>> to great success, even with FMU6.
>>
>> Dale
>
>
> _______________________________________________
> 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