But I think I started off wrong using the click functions the form should be
bind submit no?
I am here now but nothing
addTest('#add_test'); //this is the form ID and on the html page
Below is in the external js sheet
function addTest(selector)
{
var $form = $(selector);
$form.submit( function() {
var form_url = $form.attr('action');
alert(form_url);
return false;
});
}
But no alert. Any ideas?
Thanks
Dave
-----Original Message-----
From: MorningZ [mailto:[email protected]]
Sent: January-12-10 3:53 PM
To: jQuery (English)
Subject: [jQuery] Re: Function help
$('#new').live('click', function() {
addRecord($(this).closest("form").attr("id"));
});
function addRecord(form_id) {
.. stuff ...
});
No virus found in this incoming message.
Checked by AVG - www.avg.com
Version: 9.0.725 / Virus Database: 270.14.130/2607 - Release Date: 01/12/10
04:05:00