473,406 Members | 2,371 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,406 software developers and data experts.

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.butacasalada.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.butacasalada.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>Untitled 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="formulario"
id="formulario" onSubmit="return chkFormular()">
<input type=hidden name=email value="bu**********@gmx.net">
<input type=hidden name=url
value="http://www.butacasalada.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 1331
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="formulario"
id="formulario" onSubmit="return 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**********@gmx.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
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...
7
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...
3
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...
7
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...
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...
18
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
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...
19
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...
6
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...
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: 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...
0
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,...
0
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,...
0
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...
0
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...
0
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...

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.