Hellow!

I tried to understand your problem and what comes out from your post
is: it's messy.

I don't have a solution for your problem but I'll try to help you as
much as I can. What I'll try is to show you is the path to make your
script works.

So, First, let us explain what you want:
You have a table and you want it to be editable with an auto-
completion on fields.

Second, how it should be handled in order to make it editable:
   - OnFocus Field -> function Ajax.AutoCompleter (prototype based or
your script, as you want :).
   - OnSubmit Field -> function OnClick launching a new function in
order to launch two things:
          - Update the database (giving all information needed like
id, value, token etc.). Using form.request pointing to a php file with
a mysql querry.
          - Once database updated you need to update your table. Using
ajax.updater to get your fresh table and to put it over your old table

That's it, no more. I hope it helps you a bit, if not... what a shame!
^^

Have a nice day,

Jinsa.


On May 16, 10:45 am, Magnus Johnson <magnus.x.john...@gmail.com>
wrote:
> Hello,
>
> I am using ajaxUpdater to allow the user to add an arbitrary number of
> rows to a table. Then the user feeds in data into each field in the
> table. This part works excellent. The problem I run into is when I
> want to use ajax auto complete in in column 1 on each row in the
> table. I am using the following tool for 
> this:http://freeajaxscripts.net/directory/Ajax_auto_complete/Gagandeep_Sin....
>
> In a static table (not modified by ajaxUpdater) this also works
> excellent. However when I add a new row to my table, the auto complete
> does not work on the rows added by ajaxUpdater.
>
> My code for the table looks like this:
> echo "<form action=\"$currentfile\" method=\"get\" class=\"asholder
> \">";
> echo "<table id=\"mytable\" class=\"bluetable\">";
> echo "<tr><th>Column 1</th><th>Column 2</th></tr>";
> echo "<tr id='row1' > <td> <input type=\"text\" name=\"name[]\" id=
> \"testinput1\" value=\"\"> </td>";
> echo "<td> <input type=\"text\" name=\"amount[]\" value=\"\"> </td>";
> echo "<td> <a href=\"\" onmousedown=
> \"ajaxUpdater('row1','change_row.php?remove')\"> <img src=\"b_drop.png
> \"/> </a> </td></tr>";
> echo "</table>";
> echo "</form>";
> And a button to add new rows to the table:
> echo "<input type=\"button\" value=\"New row\" onClick=
> \"ajaxInserter('mytable','change_row.php?add')\">";
>
> When I add a new row by using the php script change_row.php I change
> the id to testinput2, testinput3 and so on. This is the id that the
> ajax auto complete triggers on, but it does not :-(.
>
> I am quite stuck here so any help would be appreciated.
>
> /Magnus
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Prototype & script.aculo.us" group.
> To post to this group, send email to prototype-scriptacul...@googlegroups.com.
> To unsubscribe from this group, send email to 
> prototype-scriptaculous+unsubscr...@googlegroups.com.
> For more options, visit this group 
> athttp://groups.google.com/group/prototype-scriptaculous?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To post to this group, send email to prototype-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.

Reply via email to