[Javascript] Re: log file
Roger Roelofs
rer at datacompusa.com
Wed Jan 30 12:45:35 CST 2002
I had a similar problem, If you name each element in your form
appropriately, you can use javascript's associative array to store
values.
startvals = new Array(); //data from db
startvals['FirstName'] = "John";
....
for ( i=0; i<form.elements.length; i++ ) { //checking code
if ( startvals[form.elements[i].name] != form.elements[i].value ) {
....
obviously it is a bit more complex than that because you have to deal
with different types of elements, but I bet you get the idea.
HTH
On Wednesday, January 30, 2002, at 01:01 PM, javascript-
request at LaTech.edu wrote:
> Hi
>
> When you make your loop throw the form request the type of the element
> then
> if it's a select just found the one selected if it's radio found the one
> checked
>
> you must reproduce the array your built with the way the form its built
> like that your first item in the array match the first item in the form
> and
> etc
>
Roger,
Roger Roelofs Phone 616 574-0480 x246
Datacomp Appraisal Services Fax 616 574-0486
3215 Eaglecrest Drive, NE Suite 100 email rer at datacompusa.com
Grand Rapids, MI 49525-4593 web www.datacompusa.com
More information about the Javascript
mailing list