Hello,
I have a form. On submit I want a javaScript to check if any fields
are filled in and if so, if the fields that correspond to the filled -
in fields are also filled in.
I wrote a js function which gets called onSubmit.
But I don't have the change to see if the js I wrote works because the
script doesn't even get called - I put an alert('test'); in the first
line of the function definition but after a submit there's no alert:
<form name="form_questions"
method="post"
onSubmit="return checkForm(this);">
[...]
function checkForm(theForm){
alert("inside the function!");
[....]
}
If I put an alert('test'); directly after the onSubmit:
onSubmit="alert('test');">
Here I DO get an alert after form submission.
I have no clue as to what is wrong here since nothing happens. Very
frustrating, I can't continue developing this way.
Could it be a syntax error? Does a debugger exist for javascript code
(win2k)???
Thanks for any tips & help,
Marc