which form.element am I validating..... 
Author Message
 which form.element am I validating.....

Hi there....
I would like to get the number of a specific form.element (the onblur
element) for the reason to change the value of the next element (element+1)

Can that be done ????

- if so, how ?

Thanx for everyone who makes life easier  ;o)

Pia



Fri, 16 Apr 2004 19:52:35 GMT  
 which form.element am I validating.....
<script>
function whichElement(e) {
  var f = e.form;
  for (var i=0; i<f.length; i++) if (e==f[i]) return i;
Quote:
}

</script>

<form onsubmit="return false">
<input onblur="alert(whichElement(this))" value="Fred">
<input onblur="alert(whichElement(this))" value="Wilma">
<input onblur="alert(whichElement(this))" value="Barney">
<input onblur="alert(whichElement(this))" value="Betty">
</form>

--
Think like a man of action, act like a man of thought -Henri Bergson

=-=-=
Steve
-=-=-



Quote:
> Hi there....
> I would like to get the number of a specific form.element (the onblur
> element) for the reason to change the value of the next element
(element+1)

> Can that be done ????

> - if so, how ?

> Thanx for everyone who makes life easier  ;o)

> Pia



Fri, 16 Apr 2004 21:52:41 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Finding # of specific element in forms elements collection

2. Equivalent of document.form.elements[x] on page w/o form

3. check for non existent form element Request.Form

4. Validating a form in same asp-file

5. Validating a form entry

6. Validating form field to make sure it's a number

7. Validate one form item based on another

8. Validate a field in a custom form

9. Help: Validating forms

10. Validating form data

11. form input validating

12. Validating A submit form not working, Help.

 

 
Powered by phpBB® Forum Software