Hello,

I have a feeling this is a simple question, but I just can't get it to work. I have a page with many forms updatenotes_1137", "updatenotes_1138", "updatenotes_1139", and so on. Each of these forms have a text input named "b_user." I want to call a JS function with the name of the form and have it change the value of "b_user" from that field.

Here's a summary of my attempt (this is the exact code I'm working with while trying to figure it out):

Code:
<html>
<head>
<script>	
function add_B_User(form_Name)
{
	//document.["form_Name"].b_user.value = "Hello World!";
	alert(form_Name);
}
</script>
</head>

<body>

<form id='updatenotes_1139' action=index.php method=POST>
<input size=20 type=input name='b_user' value="LVS BOOKS">
<input type=submit>
</form>

<script>
add_B_User("updatenotes_1139");
</script>

</body>
</html>


Now, if i only use the alert:
Code:
function add_B_User(form_Name)
{
	//document.["form_Name"].b_user.value = "Hello World!";
	alert(form_Name);
}
The alert works just fine, transmitting the input name. So it's gotta be something in the syntax of that the "Hello world!" line of code. Just not sure what .

Thanks for any help!
- Alex