Results 1 to 2 of 2

Thread: Text Box Javascript Question (Sorry.. I need the answer.. now)

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Sep 1999
    Location
    Phoenix, az
    Posts
    1,517
    Could someone give me a J script function
    to change a text box value??

    The code needs to do this..

    FunctionCall(20)

    Function Functioncall ( Value as iNteger)
    Text box = Text Box + Value
    end function

    How do I do that in JavaScript?

    Thanks!

  2. #2
    Guest
    Code:
    <script>
    function functioncall(ivalue) {
    document.FormName.TexBox.Value = document.FormName.TextBox.value + ivalue
    }
    </script>
    of course you will have to create the form

    Code:
    <HTML>
    <HEAD>
    </HEAD>
    <BODY>
    <FORM NAME="FormName">
    <INPUT TYPE="TEXT" NAME="TextBox" SIZE=50>
    <INPUT TYPE="BUTTON" NAME="Button1" VALUE="Click Me" onClick="functioncall(20)">
    </FORM>
    </BODY>
    </HTML>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width