473,385 Members | 1,863 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.

checking textfields

roN
Hi,
I'm getting desperate, I just wanna check if mandatory fields are filled
with text on http://paykiosks.net/contact_new.htm but it somehow just
wouldn't work. :(
s mall piece looks like:
[js]
if (document.Formular.first_name.value == "")
{
alert("Please enter your firstname!");
document.Formular.first_name.focus();
return false;
}
[/js]
[html]
<form name="Formular" method="post" onSubmit="return chkform()"
action="http://www.salesforce.com/servlet/servlet.WebToLead?encoding=UTF-8">
....
....
....
<input type="text" size="20" name="first_name" class="flat">
[/html]
What's wrong??? huh? can't see it...
I'd appreciate if anyone could have a look at it and tell me where i'm going
wrong. Thank you!

Ron
Sep 18 '06 #1
1 1170

roN wrote:
Hi,
I'm getting desperate, I just wanna check if mandatory fields are filled
with text on http://paykiosks.net/contact_new.htm but it somehow just
wouldn't work. :(
s mall piece looks like:
[js]
if (document.Formular.first_name.value == "")
{
alert("Please enter your firstname!");
document.Formular.first_name.focus();
return false;
}
[/js]
[html]
<form name="Formular" method="post" onSubmit="return chkform()"
action="http://www.salesforce.com/servlet/servlet.WebToLead?encoding=UTF-8">
...
...
...
<input type="text" size="20" name="first_name" class="flat">
[/html]
What's wrong??? huh? can't see it...
I'd appreciate if anyone could have a look at it and tell me where i'm going
wrong. Thank you!

Ron
I don't really see anything wrong. I created the following test page
based on your code and it worked as I expected. Copy and paste it and
see if you get the same results.

<html>
<head>
<script type="text/javascript">
function testIt() {
if (document.Formular.first_name.value == "")
{
alert("Please enter your firstname!");
document.Formular.first_name.focus();
return false;
}
}
</script>
</head>
<body>
<form name="Formular" onsubmit="return testIt();"
action="javascript:alert('Submitted');">
<input type="text" name="first_name"/><br/>
<input type="submit" value="Submit"/>
</form>
</body>
</html>

Sep 19 '06 #2

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

Similar topics

3
by: R.G. Vervoort | last post by:
I would like to select an option in a pulldown, select a record in a mysql database depending on the pulldown selection and then put the data from the record in the textfields. I can retrieve...
1
by: Filips Benoit | last post by:
Dear All, After copying a record using an Stored procedure all textfields (nvarchar) has max lenght ! See VBA-code and SP below VBA-code tos execute SP
1
by: Ed | last post by:
Hi, I have an html page with a div element within a form for dynamically creating textfields. The problem is when I click a link on the page, or the submit button, then click the back button,...
1
by: Rich Wahl | last post by:
Ok, This may sound like a noob question, but I have an application, that asks the user to fill in fields from a pre-generated list of possibilities. And upon clicking submit, the user is...
6
by: anirban.anirbanju | last post by:
hi there, i've some serious problem to add rows dynamically in a table. my table contains 5 cell. | check | from_value | to_value | color_text | color_value |...
0
by: chandutp | last post by:
hi i am new to this forum can i populate datagrid items of asp page to another asp page having textfields. in this datagrid userId is the index key by which it referenced.and i am using edit...
1
by: eureka | last post by:
Hi folks, I am working on a webapplication using Jsp and JS. On my main Jsp(Jsp1) I have a table which is created dynamically inside a <divand contains all the backend-table's records as rows,...
3
by: nicky77 | last post by:
Hi there, newish to javascript so grateful for any help. I am creating a test generator and have an array of textfields ("answer") created by a simple piece of PHP code. As you can see, I have...
5
by: pradeep84 | last post by:
Hi.. to all... in the following program i hav retrived data from the database and stored in the string s2,s3... now i hav display the following string in the textfields... i dont know how.. to do...
3
by: bravephantom | last post by:
In my project "scientific calculator", im using 2 textfields in my GUI app. the problem now (or actually what i dislike) is the user has to use the 2 textfields even if he needs a function of only 1...
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: 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
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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...
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,...

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.