Using jQuery 1.4 to do this.
Adding a form to the body tag, nothing special about the form itself:
$(function() {
$('body').prepend('<form name="frmSample" id="frmSample"><input class="btn" type="submit" value="SIGN UP" /></form>');
});
I'm using the following to submit the form:
$('#frmSample').live('submit', function() {
var formdata = $(this).serialize();
$.ajax({
type: 'POST',
url: 'http://www.example.com/Values.jsp',
data: formdata,
success:function() {
submit_success();
}
});
return false
});
On the newest browsers (Firefox 3.5, Safari 4) this works fine. Once I go down to FF 3.0 and below or IE 7 and below this stops.
I'm a bit stuck right now. I've been searching for a good bit and have only been able to find anything mentioning something other than return false or event.preventDefault().
So looking to see if I am missing something small here, or am going in the totally wrong direction.