Hi there I wonder if I can get any help with a simple function that I'm writing to check users input to a textbox.
Here's the story...
I've a textbox on a page called 1001 (name="1001"
it has an onBlur event tied to it that calls a function...
onBlur=checkseats('1001');
the function looks like this...
function checkseats(myBox) {
if (document.form1[myBox].value>'5'){alert('You can only order up to 5 tickets per event');}
}
This seems pretty simple but it's having a problem and I think it's because I'm using server-side scripting to generate the names of the text box, even though when I view source for that page it all looks fine!?
This is what I have written on my page for the text box
<input type="text" name="<%=Rs.Fields.Item("eventID"
.Value%>" size="1" value="<%=Rs.Fields.Item("Quantity"
.Value%>" maxlength="1" onBlur=checkseats('<%=Rs.Fields.Item("eventID"
.Value%>');>
Thanks in advance!
Here's the story...
I've a textbox on a page called 1001 (name="1001"
it has an onBlur event tied to it that calls a function...
onBlur=checkseats('1001');
the function looks like this...
function checkseats(myBox) {
if (document.form1[myBox].value>'5'){alert('You can only order up to 5 tickets per event');}
}
This seems pretty simple but it's having a problem and I think it's because I'm using server-side scripting to generate the names of the text box, even though when I view source for that page it all looks fine!?
This is what I have written on my page for the text box
<input type="text" name="<%=Rs.Fields.Item("eventID"
Thanks in advance!