473,785 Members | 2,290 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Need your help, I am new with javascript, what do I wrong? javascript form validation suddenly doesn´t work

Yesterday I had a problem with a javascript to validate my form, but
you helped my out yesterday and it works now perfectly!!! so thank
you!!!

the problem I have now is the following:

I put my form now on the server and I changed following lines:

I changed:
form action="mailto: fr**@gmx.net"

to

form action="/cgi-bin/formmail"

and I added the following lines:

<input type=hidden name=email value="fr**@gmx .net">
<input type=hidden name=url
value="http://www.butacasalad a.tk/main.htm">

the problem is, that now the javascript doesn´t validate my form
anymore,
when I press the submit button it sends the form to the indicated
email but without a validation and then jumps to the indicated url.

what did I wrong?
what can I do?

hope you can help me with the last step now

regards

francisco lopez

pd

(when I erase the lines
<input type=hidden name=url
value="http://www.butacasalad a.tk/main.htm">
the form validation works again but than I don´t recive any email with
the form-data and a new server page appears saying that the form was
sent correctly, which is not correct because I don´t recive any email.

you can see this an my webpage: www.butacasalada.tk under "cine"--"tu
voto!"
here you can see the script:
<html>
<head>
<title>Untitl ed Document</title>
<meta http-equiv="Content-Type" content="text/html;
charset=iso-8859-1">
<script language="" type="text/javascript">
<!--
function chkFormular()
[snip]
//-->
</script>
</head>
<body>
<form action="/cgi-bin/formmail" method="post" name="formulari o"
id="formulario " onSubmit="retur n chkFormular()">
<input type=hidden name=email value="bu****** ****@gmx.net">
<input type=hidden name=url
value="http://www.butacasalad a.tk/main.htm">

<input type="reset" name="Reset" value="borrar todo">
<input type="submit" name="Submit2" value="enviar" >

</form>
</body>
</html>
Jul 23 '05 #1
2 1355
francisco lopez wrote:
[...]
<script language="" type="text/javascript">
The empty language attribute tricked Safari, I suspect it is your
problem. The language attribute has been depreciated for over 6 years
(according to Mike Winter, I'll trust him on that), so get rid of it.
Only type is required (and makes language redundant anyway).
<!--
Don't hide scripts, that hasn't been necessary since about 1996. Even
browsers that don't have JS know not to display scripts.
function chkFormular()
[snip]
If you are going to remove the content of a function, keep the braces
or an error will result:

function chkFormular() {}
</script>
</head>
<body>
<form action="/cgi-bin/formmail" method="post" name="formulari o"
id="formulario " onSubmit="retur n chkFormular()">
<input type=hidden name=email value="bu****** ****@gmx.net">


All attribute values should be quoted, you can get away with it for now
but get used to it for the future.

<input type="hidden" name="email" value="bu****** ****@gmx.net">
[...]

Hope that helps!
--
Rob
Jul 23 '05 #2
In article <b0************ **************@ posting.google. com>,
bu**********@gm x.net says...
Yesterday I had a problem with a javascript to validate my form, but
you helped my out yesterday and it works now perfectly!!! so thank
you!!!

the problem I have now is the following:


You've got two fields called "email" in the same form.

--
Hywel http://kibo.org.uk/
I do not eat quiche.
Jul 23 '05 #3

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

Similar topics

11
8756
by: Jim | last post by:
Hi, I keep getting form results emailed to me that would indicate a form from my web site is getting submitted with all fields blank or empty, but my code should preventing users from proceeding if they left any field blank. My guess is that someone is trying to hack the site using the form to gain entry or run commands -- I don't really know since I'm not a hacker. I just know that forms are often susceptible to these kinds of...
7
4893
by: AnnMarie | last post by:
My JavaScript Form Validation doesn't work at all in Netscape, but it works fine in IE. I made some of the suggested changes which enabled it to work in IE. I couldn't make all the changes because then it didn't work in IE. How can I enable this javascipt form validation to work in Netscape? When I use netscape, none of the alert boxes appear. It submits the form without validating anything.
3
1889
by: Sol Linderstein | last post by:
Hi, I'm writing a CGI application and here's what I'm stuck with. There are some text boxes in an html form that I want to validate. The validation needs to happen on the server side because the data to validate against is inside a mysql database residing on the server. I want to present the user with a popup only if the validation fails. Ideally the user doesn't even know the validation is happening unless it fails. He just moves from...
7
2360
by: Jack Addington | last post by:
I've got a fairly simple application implementation that over time is going to get a lot bigger. I'm really trying to implement it in a way that will facilitate the growth. I am first writing a WinForms interface and then need to port that to a web app. I am kinda stuck on a design issue and need some suggestions / direction. Basically I have a business layer that I want to use to process any dataentry logic (row focus changes, data...
4
10147
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
18
3043
by: Q. John Chen | last post by:
I have Vidation Controls First One: Simple exluce certain special characters: say no a or b or c in the string: * Second One: I required date be entered in "MM/DD/YYYY" format: //+4 How ??
15
4644
by: Cheryl Langdon | last post by:
Hello everyone, This is my first attempt at getting help in this manner. Please forgive me if this is an inappropriate request. I suddenly find myself in urgent need of instruction on how to communicate with a MySQL database table on a web server, from inside of my company's Access-VBA application. I know VBA pretty well but have never before needed to do this HTTP/XML/MySQL type functions.
19
3316
by: Ganesh J. Acharya | last post by:
Hi there, I want to redesign my website and make that look professional. I made this about 6 years ago with very little knowledge of internet. Today I am getting about 4000 visitors a day for the same. What are the things I need to keep in my mind when doing this process.
6
1870
by: smk17 | last post by:
I've spent the last few minutes searching for this question and I found an answer, but it wasn't quite what the client wanted. I have a simple online form where the user needs to fill out five fields out of nine. The other four are already there and filled out for the user. When they hit submit, all data is sent to us. But, if they desire (for whatever reason) the user can possibly delete what is already there and fill in something...
0
9646
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9484
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
10350
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
10157
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10097
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
7505
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
5386
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...
1
4055
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
3658
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.