Question: There will be 0-10 forms on a page. Each will allow a user to vote on the content of that form. How do I utilize javascript to capture click events for those different forms, and return content to the scope of a specific form. If I dynamically generate id's for the forms, how to I account for that in javascript?

Answer: 
If you use the jQuery JavaScript library then you can attach the same function to all forms in one go, and have a reference back to a form inside of a callback function. For example if you were waiting for a form to be submitted by the user to send of an AJAX request you could do this:

```
// `$('form')` selects all the forms on the page
// `.submit();` will call a function when the submit event is fired on all forms
$('form').submit(function() {
    // Store a reference to this form
    var $thisForm = $(this);

    $.ajax({
        ...
        success: function() {
            // do something with the $thisForm variable which is still in scope.
        }
    });
});

```
I am uncertain about what you exactly want.

how about assigning onclick event when you are generating the ids. 

```
x.id = idname ; 
x.onclick = func(idname)

```

and then func decides what to do based on id.