Soldato
- Joined
- 18 Oct 2002
- Posts
- 15,699
- Location
- The land of milk & beans
Hi all,
is there any reason the below code won't work...
all i get is 'document.frmTest.txtMain is not an object'.
everything is typed correctly, and the form and field do exists as it works when i hard code document.frmTest.txtMain, but i need to parameterise it so i can reuse the code elsewhere.
Can someone help before i turn into a proper scopey
Cheers
is there any reason the below code won't work...
Code:
var objTextArea = document.frmTest.txtMain
alert(objTextArea.value)
everything is typed correctly, and the form and field do exists as it works when i hard code document.frmTest.txtMain, but i need to parameterise it so i can reuse the code elsewhere.
Can someone help before i turn into a proper scopey

Cheers