Accessing the contents of a form textbox using the ID?
Posted on 2004-12-01
I'm using some third party software to deliver HTML/ASP generated pages to the browser. The browser (the IE engine) actually sits inside the third party software. When the third party software starts up it gets invoked by the user by passing a account number into it. The third party software then runs it's own component methods to look up the account number from a MSSQL database and return the details of that account.
The returned data gets populated into FORM fields identified by the id, for example
<input id=accountname size=20>
<input id=accountpassword size=10>
So when the page first loads all of the data has already been queried from the db and then pushed into those form boxes, based on the id. The id tag is the database table field name, fyi.
So my question is... is there a way to now access the contents of those fields, like:
accountname = document.account.accountname.value
and then I can use that data?