nwebie onsubmit

B

bbxrider

the onreset is working but problem somewhere in the onsubmit or the function
it calls.
i have abbreviated the called verfiy function for now just to get the basic
onsubmit part working
basically the screen just gives a flash and it also alters the initial html
code after the form tag,
which seems really weird to me
this is kind of long but pretty basic i think
need some help please

onsubmit and reset code:
<FORM onSubmit="
this.firstname.optional=true;
this.lastname.optional=true;
this.addr1.optional=true;
this.city.optional=true;
this.state.optional=true;
this.zip.min=0;
this.zip.max=99999;
this.homephone.optional=true;
this.email.optional=true;
return verify(this);
"
onreset = "
return confirm('do you really want to erase '+
'everything entered and start over from scratch?');
"html code for the form, the verify function is after all the html code

the verify function:
<script languauge="javascript">
function verify(f)
// verifies all the fields set for verification and messages
{
if confirm('this will return true(ok) or false(cancel)' {
return true;
else
return false;
}
var msg;
var empFld = "";l
var errors = ""
...............lots more verification code here once i can at least get a
confirm to display
}
 
B

bbxrider

can't seem to get anything to run concerning submit????

since the first post i've tried the alternative to the 'standard' submit :
<input type="button" value="submit" onClick="verify(this.form)">

the code so far in 'verify()' is only a confirm() but that won't even come
up
function verify(f)
// verifies all the fields set for verification and messages
{
confirm('return true=ok or false=cancel');
return true;
}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,540
Members
45,024
Latest member
ARDU_PROgrammER

Latest Threads

Top