473,804 Members | 2,292 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.o ptional=true;
this.addr1.opti onal=true;
this.city.optio nal=true;
this.state.opti onal=true;
this.zip.min=0;
this.zip.max=99 999;
this.homephone. optional=true;
this.email.opti onal=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="java script">
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 7215
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*******@comc ast.net> wrote in message
news:YxGUa.1560 37$H17.55379@sc crnsc02...
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.o ptional=true;
this.addr1.opti onal=true;
this.city.optio nal=true;
this.state.opti onal=true;
this.zip.min=0;
this.zip.max=99 999;
this.homephone. optional=true;
this.email.opti onal=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="java script">
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 = ""
..............l ots 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
4544
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 'Save as Incomplete' button is Clicked the form will be going to the "SaveAsincomplete.asp" without validation of the fields. And when the 'save as complete' is clicked certain fileds are to be validated and by the function return value, if false...
4
18693
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 also register the code in the onSubmit event. Any suggestions as to why this is happening or how to resolve it? -Stu
3
12158
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" value="" onclick="return validate_form()"> </form> where validate_form() returns true or false depending on whether the user entered a valid age.
2
6473
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 ... onSubmit="checkData();">
4
10152
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 the validators. The user enters the data, presses OK. My OK button is dynamically generated as well, with some code-behind logic in
2
6610
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 executed? thnx, Christoph
8
6854
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
1945
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 true or false. I want to find a way to add my component's "onsubmit" event to the form without overwriting user-defined onSubmit() handlers or onsubmit events. Is there a really good way of doing this? The problem I've come across was if I add...
2
4778
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 I will. Let me illustrate the problem with examples. The HTML: <html> <head> <script type="text/javascript" src="/js/mootools_1_11.js"></script>
0
9591
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10594
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10087
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7631
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6861
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5529
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5667
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4306
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3831
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.