Hi,
I'm not very familiar with Javascript. I usually leave that kind of
stuff up to Dreamweaver, but i'm starting to need a little more than it
can offer.
I have an asp page which creates a form from a record set. Very simply
it lists items that can be ordered by the customer. The customer simply
enters the required qty for each item and hits submit:
<form action="order.a sp" method="post" name="OrderForm " id="OrderForm" >
While NOT rsOrderFormItem s.EOF
<tr>
<td><%=(rsOrder FormItems.Field s.Item("ITEM_CO DE").Value)%> </td>
<td><%=(rsOrder FormItems.Field s.Item("DESCRIP TION").Value)%> </td>
<td><input name="ORDER_QTY " id="ORDER_QTY" value="0"></td>
<td><%=(rsOrder FormItems.Field s.Item("MAX_ORD ER_QTY").Value) %></td>
</tr>
Wend
As you can see, the last column lists the maximum that can be ordered.
What I would like is some simple client side validation that checks that
the value in ORDER_QTY is a number between 0 and MAX_ORDER_QTY (or empty
just in case the user deletes a value). I need the validation to be
done for each record.
Also, as there can be quite a lot of records on a page, aswell as a
message box it would be nice if the textboxes with errors could be
higlighted. Maybe change the class of the textbox?
Any help or pointers would be greatly appreciated.
Many TIA,
Red.
I'm not very familiar with Javascript. I usually leave that kind of
stuff up to Dreamweaver, but i'm starting to need a little more than it
can offer.
I have an asp page which creates a form from a record set. Very simply
it lists items that can be ordered by the customer. The customer simply
enters the required qty for each item and hits submit:
<form action="order.a sp" method="post" name="OrderForm " id="OrderForm" >
While NOT rsOrderFormItem s.EOF
<tr>
<td><%=(rsOrder FormItems.Field s.Item("ITEM_CO DE").Value)%> </td>
<td><%=(rsOrder FormItems.Field s.Item("DESCRIP TION").Value)%> </td>
<td><input name="ORDER_QTY " id="ORDER_QTY" value="0"></td>
<td><%=(rsOrder FormItems.Field s.Item("MAX_ORD ER_QTY").Value) %></td>
</tr>
Wend
As you can see, the last column lists the maximum that can be ordered.
What I would like is some simple client side validation that checks that
the value in ORDER_QTY is a number between 0 and MAX_ORDER_QTY (or empty
just in case the user deletes a value). I need the validation to be
done for each record.
Also, as there can be quite a lot of records on a page, aswell as a
message box it would be nice if the textboxes with errors could be
higlighted. Maybe change the class of the textbox?
Any help or pointers would be greatly appreciated.
Many TIA,
Red.
Comment