I'm wondering if it's possible to use a text link to submit a form
that has a unique id? I'm using the Official form plug in (http://
www.malsup.com/jquery/form/) which is great, aside from me not being
able to figure this out. (=

Here is the code I'm using

<php start loop>
<script type="text/javascript">
<!--
        $(document).ready(function() {
            $('#deleteForm<?=$comment['commentid']?>').ajaxForm({
                target: '#editor-response',
                success: function() {
                        $("#deletemsg<?=$comment['commentid']?
>").not(".alert").append(msg)
                }
            });
        });
-->
</script>

<form action="ajax/delete_comment.php" method="post" id="deleteForm<?=
$comment['commentid']?>">
        <input type="hidden" name="do" name="deletecomment">
        <a id="#deleteComment<?=$comment['commentid']?>" class="deletlink"
title="Delete this comment?" href="javascript:;">delete?</a>
</form>
</php end loop>

I was using this as the link <a
href="javascript:delete_comment(document.deleteForm<?=
$comment['commentid']?>)"> but it wasn't allowing the form plug-in to
recognize it.

Also, I'm wondering if there a more efficient way to do this.
Currently the JavaScript is inside a php loop and each comment has
it's own unique id. Thanks!

Reply via email to