473,385 Members | 1,546 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

nwebie onsubmit

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
}
Jul 20 '05 #1
1 7195
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;
}

"bbxrider" <bb*******@comcast.net> wrote in message
news:YxGUa.156037$H17.55379@sccrnsc02...
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
}

Jul 20 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Varun | last post by:
Hi There, I have a form("myRequest.asp") and the values from it are retrieved into the page ("output_Print.asp") on which I have two buttons('Save As Complete' and 'Save As Incomplete'). When the...
4
by: Stuart Wexler | last post by:
Hi, I have a form with onSubmit embedded in the <form> tag. The form is submitted programatically through javascript . While the form submits fine, nothing I'm doing seems to get it to...
3
by: n3mtkj3mzsir0cy | last post by:
I have created web pages that do client-side form validation using the onclick directive. E.g., <form action=other_page.cgi method=post> Enter your age: <input name=age> <input type="submit"...
2
by: Sean Dockery | last post by:
Which is the following is correct? a) <form ... onSubmit="return checkData()"> b) <form ... onSubmit="return checkData();"> c) <form ... onSubmit="checkData()"> d) <form ......
4
by: usl2222 | last post by:
Hi folks, I appreciate any assistance in the following problem: I have a form with a bunch of dynamic controls on it. All the controls are dynamically generated on a server, including all...
2
by: Sorrow | last post by:
If you have an onsubmit event handler defined for a form, it doesn't seem to trigger if you manually call the .submit() method of the form object. Is there any way you can make sure that code is...
8
by: Mark Livingstone | last post by:
I have a form that uses the following: onSubmit="some_var = 'validated';" FireFox is OK with that. Internet Explorer isn't. any ideas why? Thanks.
1
by: vunet | last post by:
I write a JS library component which is applied to every form on a webpage. The component does something before it submits the form. Now, let's say user has his own onSubmit() handlers returning...
2
by: rudiedirkx | last post by:
Gents, I have a problem (only in Safari) with the onsubmit in webforms. This topic covers the same subject: http://bytes.com/topic/javascript/answers/166542-onsubmit-safari but not as detailed as...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.