469,336 Members | 5,552 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,336 developers. It's quick & easy.

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

Jul 20 '05 #1
1 2274
Lee
Frank said:


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;
}


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.

Jul 20 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

By using this site, you agree to our Privacy Policy and Terms of Use.