This double spacing seems to be caused by the input box on this form. I'm typing single spacing, and it appears double.
This is how my function looks now:
var errpresent = false;
function validateForm(){
runnerid_validate()
eventid_validate()
date_validate()
fintime_validate()...
I told you I was new to this!
No idea where the double spacing has come from. It's not there in my text editor.
"Please write valid HTML. I mean no windblown attributes, with value and name separated by whitespaces."
Give me an example and I'll try to improve.
"Make sure your validateForm()...
Sorry - never used this before. Is this what you mean?
var errpresent = false;
function validateForm(){
runnerid_validate()
runnerid_validate()
eventid_validate()
date_validate()
fintime_validate()
position_validate()
category_validate()
agegrade_validate()
if (errpresent == true){...
Thanks. Still being stupid this end.
My function needs to be called to make it carry out the validation. If I use "return validateForm" in the onsubmit event I get true, as the function hasn't been called, so the form submits without validating.
Where do I put the function call so that the...
I know my code is not elegant. All I want is for it to work. I have taken your advice, and now pulled all the error checking functions together, and called them from a function related to an onSubmit event. This issues an alert that there are errors, the error messages are displayed as I want...
Thanks for all the help. I did say I was new to javascript, so it might take me a while to digest it all, but I'll probably be back with more questions soon!
This is the html:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-type" content="text/html; charset=iso-8859-1"/>...
I want to validate a field in a form, using onblur. If the field is empty, or contains data in the wrong format, I display an error message alongside that field, using addmessage. So far so good.
Now I want to force the user to respond, so I want to restore focus to that field, and not let them...
I'm trying to do the same as you, but I am not a VB coder, so I'm struggling. I think I can use this code for my filters, but where do I put it?
I've got a form based on a dataset I want to filter by name, date and location. I'm using a combo box to filter by name, but when I add a location...
I used to run Visio 3.0a before MS bought it, and I had a calendar add-on. Recently I moved up to Visio 2000SR1 6.0.2072 but now I can't run the calendar or the older version of Visio (it's on a separate disk) and get the message that Visio needs to be running before the calendar wizard can...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.