Hi,

This is the best I can do so far, the form is getting submitted but
the target id is still 'undefined'.    Just to be clear what I am
trying to do.  I have forms in table cells as part of a CMS.  When the
form gets submitted I only want the contents of the cell updated (i.e.
the form code itself).  There can be up to 100 of these forms on a
page so I need a way of selecting the target as part of the javascript
code.

As ever any help greatly appreciated.
- Tom

//html

<td  id="td-active-[rid]">
<form action="activeResult.tmpl" method="post" id="active-[rid]">
...
</form>
</td>



//Jquery Plugin code
$(document).ready(function() {

$('[EMAIL PROTECTED] form');

var formId = this.id;

$(this).ajaxForm({
        target: formId,
        url: 'siteminderAjax.tmpl',
        beforeSubmit: function() {
        alert(formId)
        },
        success: function() {
        alert('Ajax call complete.')
        }
});
});





On Nov 29, 4:44 pm, Tom Duke <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> New to the list and jquery. I am trying to bind the JQuery form plugin
> to multiple forms on a single page.  I can do this but I cannot figure
> out how to assign different options for each form.
>
> The form code is :-
>
> <form action="activeResult.tmpl" method="post" id="active-[rid]">
> ...
> </form>
>
> Where the rid is unique for each form.
>
> My JQuery code is :-
>
> $(document).ready(function() {
>     var options = {
>                 target: '#td-active-[rid]',
>                 url: 'activeSnippet.tmpl'
>         };
>    $([EMAIL PROTECTED]).ajaxForm(options);
>         });
>
> I cannot figure out how to set a unique target for each form where the
> [rid] in the target matches the [rid] in the form id.
>
> Any help greatly appreciated.
>
> Thanks
> - Tom

Reply via email to