simonchambers
January 17th, 2003, 05:49 AM
Hi,
On a webform that I have created I need to be able to loop through a number of textbox values and determine if they are greater than a specified amount, before the form is submitted.
In the old asp architecture I would do the following:
<button .......on click='checkdetails(form,form.elements.length)'...>
this would then call a predefined javascript function that would look something like:
checkdeatils(form,x)
{
if(form.textbox1.value + form.textbox2.value = 33)
{
alert('ok your amonut is ok')
}
else
{
form.submit
}
}
What i need to do is get this same functionality into .net. It looks like this is done through the custom validation control, which I have got to call a javascript function. What I cannot do however is somehow get this function to reference more than one control/form value (i.e. multiple textboxes as above).
Can this be done??
Many Thanks
Simon:confused:
On a webform that I have created I need to be able to loop through a number of textbox values and determine if they are greater than a specified amount, before the form is submitted.
In the old asp architecture I would do the following:
<button .......on click='checkdetails(form,form.elements.length)'...>
this would then call a predefined javascript function that would look something like:
checkdeatils(form,x)
{
if(form.textbox1.value + form.textbox2.value = 33)
{
alert('ok your amonut is ok')
}
else
{
form.submit
}
}
What i need to do is get this same functionality into .net. It looks like this is done through the custom validation control, which I have got to call a javascript function. What I cannot do however is somehow get this function to reference more than one control/form value (i.e. multiple textboxes as above).
Can this be done??
Many Thanks
Simon:confused: