But without the ugly effect that the new value is displayed in the the form.
if i do:
$('#submit_button').click(function(){
$('#field1').val('newval');
$('#form1').submit(); });
The #field1 will display (for a split second) the new value which is kind of ugly..
From the code above, it looks like you’re completely ignoring the value of the visible form element, if so why not just put a hidden form field with the name you’re using, and ignore what’s posted through from the text field.
Instead, if that code wasn’t real and you’re planning on modifying the value instead, you could use the same technique, something like this:
jQuery: