How to submit form and change value with JavaScript function?

Discussion in 'ASP .Net' started by Jurij P, Jun 28, 2003.

  1. Jurij P

    Jurij P Guest

    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
     
    Jurij P, Jun 28, 2003
    #1
    1. Advertising

  2. Jurij P

    Paul Guest

    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.


    "Jurij P" <> wrote in message
    news:...
    > 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
    >
    >
     
    Paul, Jun 28, 2003
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. r0adhog

    Change Form Field Value Prior to submit

    r0adhog, May 19, 2004, in forum: ASP General
    Replies:
    5
    Views:
    244
    Ray at
    May 19, 2004
  2. Matt Herson
    Replies:
    8
    Views:
    375
    Matt Herson
    Sep 30, 2003
  3. Joop
    Replies:
    5
    Views:
    607
  4. ljlolel
    Replies:
    2
    Views:
    513
  5. Replies:
    3
    Views:
    715
Loading...

Share This Page