-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi all,

        I'm looking for some advice on how to update a specific field in a 
table.  Given the following table :

<table>
  <tr>
    <td>
      <a href='#' onclick='editTags()'>Edit</a>
      <input type='text' name='taglist[]' value='' />
    </td>
  </tr>
</table>

Assume for the moment that there are multiple rows and columns.  I've shown the 
column I'm interested in above.  The editTags() function looks like this :

   function editTags() {
      new Ajax.Request('feeds_ajax.php',
                       {
                        method: 'post',
                        parameters: {action: 'tagedit'},
                        onSuccess: function (transport) {
                           var json = transport.responseText.evalJSON(true)
                           if (json.success == 'true') {
                              var editDiv = $('editDiv');
                              var blanketDiv = $('blanketDiv');

                              var blanket_height = blanket_size();
                              blanketDiv.style.height = blanket_height + 'px';

                              popUpDiv_height = blanket_height / 2 - 150;
                              editDiv.style.top = popUpDiv_height + 'px';

                              var window_width = window_pos();
                              window_width = window_width / 2 - 150;
                              editDiv.style.left = window_width + 'px';

                              editDiv.innerHTML = json.output;
                              blanketDiv.style.display = 'block';
                              editDiv.style.display = 'block';

                           } else {
                              ajax_error(json.error);
                           }
                        },
                        onFailure: function() {
                           ajax_error('Server returned a failure');
                        }
                       })
   }

This works as expected, displaying a CSS popup with the necessary information 
in it.  Basically it's a list of tags which can be clicked and are placed into 
a textbox.  When the user is done, they click a button and the popup vanished.  
What's supposed to happen is that the tags in the textbox are then transferred 
to the taglist field in the table.  It has to be the same row as the edit link 
that was clicked, though.  That's the part I'm having trouble with.

I've done some googling, but I guess I'm not hitting the correct keywords.  Can 
someone please assist?

Thanks,

- ---------------------------
Jason 'XenoPhage' Frisvold
[email protected]
- ---------------------------
"Any sufficiently advanced magic is indistinguishable from technology."
- - Niven's Inverse of Clarke's Third Law



-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.14 (Darwin)

iEYEARECAAYFAk1scm0ACgkQ8CjzPZyTUTR5lwCfXtJQW4f2WdHk+fKaBqZPQyZF
jUUAnjrePgHg8H4ApPl8qXJPzNCMwzYc
=bLtg
-----END PGP SIGNATURE-----

-- 
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 [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.

Reply via email to