JavaScript Document Form string.value

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Frank

    JavaScript Document Form string.value


    Does anyone knows why this string is nog working ?

    name = "sub[1]" a textfield in a form

    function item(name,total , price)
    {
    window.document .form.name"[" + t + "]".value = total;
    }

    thank you !

    Fran

    Fran
    -----------------------------------------------------------------------
    Posted via http://www.forum4designers.co
    -----------------------------------------------------------------------
    View this thread: http://www.forum4designers.com/message33178.htm

  • Lee

    #2
    Re: JavaScript Document Form string.value

    Frank said:[color=blue]
    >
    >
    >Does anyone knows why this string is nog working ?
    >
    >name = "sub[1]" a textfield in a form
    >
    >function item(name,total , price)
    >{
    >window.documen t.form.name"[" + t + "]".value = total;
    >}[/color]

    Find a book. You're not going to get very far by guessing
    at the correct syntax.

    window.document .form.elements[name].value=total;

    You have a parameter named "price" that you don't use.

    Comment

    Working...