G’day I’m new in the javascript world and this code I have works but it’s not working the way I want it to. Was wondering if someone could take a look at it and point out what I’m doing wrong.
I have multi-valued fields which I’ve split into an array. In the IF statement, if it hits one of these values in the array that is equal to the value in the ‘DateEntered’ field then I want it to tell me in the alert message. The problem is, is that it gets to the first value in the array and the alert works but it stops there.
For instance. In the array are 4 dates. 02/22/02007, 02/23/2007, 02/19/2007 and 02/16/2007. If the date in the ‘DateEntered’ field is 02/22/2007 and I clik away from the field (onblur) then the alert message tells me ‘02/22/2007’. If I pick any other date in the array, it doesn’t do anything. It only works on the first one. I think my FOR LOOP with my IF statement is not right. Here’s the code:
Thanks for any help
Kenny