Hi all,
For the module, I'm currently working on, there is a page where multiple pieces of submitted content are shown to the user (the user can then allow/remove/etc this content from the site). I've been working with JQuery to bring down the request times on the site so the page does not have to be constantly reloaded. The functionality would be (for a given item):
1) Perform operation on item.
2) Get status back on item and show it in the assigned section.
3) Remove item from page if the status back was successful.
I initially had the page working with JQuery Forms but I have now learnt about the AHAH functionality that was added (and feel adding the important bit regarding displaying status info and performing the action would be better off in there). However, when I try to bind extra functionality to the form submit via an additional js file, it won't get performed (I first tried removing the ticket but am just hoping to get the intended alert to pop up without any issues). Any suggestions on what I may be doing incorrectly?
This is the js that I am adding in a separate js file:
$('li.ticket.each(function(){
$ticket = $(this);
$("form", $ticket).each(function(){
$form = $(this);
$form.bind("submit", function(){
alert('yay, extra functionality worked');
});
});
});