I have the following jquery that adds a textbox when the function is called. Before I submit this textbox with the submit button I want to call a javascript function inside of the submit onclick to make sure that the textbox is not blank before submitting. How can I do this I am not sure how to work with the element since it is added dynamically.
$("<center><div><input type = \'submit\' onclick=\'\' name = \'upload\' maxlength = 30/></div></center>").insertAfter("#"+innerid);
$("<center><div><input type = \'text\' id = \'newteam\' name = \'newteam\' maxlength = 30/></div></center>").insertAfter("#"+innerid);
Any ideas how I can do this?