Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3

Thread: Help me pls

  1. #1
    New to the CF scene
    Join Date
    Dec 2007
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Help me pls

    how can i run this javascript code. i must use form variable a[] and b[]

    <SCRIPT LANGUAGE="JavaScript">

    function a_times_b(form) {
    a=form.a.value
    b=form.b.value
    c=a*b
    form.ans.value=c
    }


    </SCRIPT>



    <FORM name="form">
    <input name=a[] type=text value=12 size=4>
    &nbsp;&nbsp;&nbsp;X &nbsp;&nbsp;
    <input name=b[] type=text onKeyUp="a_times_b(this.form)" value=3 size=4>
    =
    <input name=ans[] type value=0 size=9>


    </FORM>

  • #2
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    You must use square bracket notation. Link here: http://jibbering.com/faq/faq_notes/square_brackets.html
    ||||If you are getting paid to do a job, don't ask for help on it!||||

  • #3
    New to the CF scene
    Join Date
    Dec 2007
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    i am not good coder i dont understand javascript.
    can u help me this coding


  •  

    Posting Permissions

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