How to submit form and change value with JavaScript function?

  • Thread starter Thread starter Jurij P
  • Start date Start date
J

Jurij P

I have a problem.
I would like to change a value from textbox with JavaScript before I submit
the form (submit updated value). Can anyone please help me?

thank you, Jure
 
Try something like.

On the client....
<form name="frmForm' action='default.asp'>
<input type="text" id='txtName'/>
<input type='button' onclick='jscript:changeTextbox();'>
</form>

<script language='JScript'>
function changeTextbox()
{
txtName.value = 'hello wolrd';
frmForm.submit;
}
</script>

On the server....
Use the event on the button, to change the property of the text box.
 
Back
Top