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_Singh/details.html.

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 at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.

Reply via email to