getting form input value on ajax loaded form using livequery
I have multiple forms that could be fetched using ajax and inserted into the current page.
I can successfully capture the submit click using
alert("testing submit button click");
- return false; // prevent form submission works fine.
However, I cannot get the loaded form's input values. I tried a variety of options that all look a bit like this...
alert("testing submit button click"); // gets to this bit
- var FormsFieldValue=$('#InputFieldID').attr('value');
- // or var FormsFieldValue=$('#InputFieldID').livequery('attr','value');
- alert("\nAnd field value=" + FormsFieldValue); // never gets to this bit
- return false; // does not prevent form submission because of code error ealier.
But just cannot figure out the correct script code.
Did loads of googling, but nada.
Just to clarify, the form in question is not loaded when the page loads, but when the user makes a selection (which determines which form).The environment is pretty comlex, hence the very basic snippets.
Any help most appreciated.