Thanks, Adam.
I'm, learning js as I need it. The more I learn, the more I see the need for 
it, though. 
I think I'll work on trying to understand some   examples, rather than just 
boldly coding.

>Ok a comple of things wrong...first off JS arrays typically start at 0.
>You should pass objects to your function, not names, so you would
>would want to pass this and you do not need to pass the form name.
>Your field_text array needs to be initialized before hand too. I also
>changed the array to an associative array moves faster and I think
>looks nicer. Heres the reworked code:
>
><html>
><InvalidTag>
>function clearOnce2(theField) {
> var  field_text = new Array();
>  field_text["ncr_number"] = "enter ncr numbers, a, b,c";
>  field_text["part_num"] = "enter a part number";
>  field_text["order_num"] = "enter an order number";
>  if (theField.value == field_text[theField.name])
>     {theField.value="";}
>

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Discover CFTicket - The leading ColdFusion Help Desk and Trouble 
Ticket application

http://www.houseoffusion.com/banners/view.cfm?bannerid=48

Message: http://www.houseoffusion.com/lists.cfm/link=i:5:141926
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/5
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:5
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.5
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to