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

input fields

Hello,
I want to test some input fields if the user has entered something.
That I do with a Javascript function. But I only know the form <form
action="ausg.php" method="post"> and so my function doesn't work
yet(it is initiated with onclick). What is a solution when I want to
retain my JAvaScript function because I think it is lesser
encumbrance.
Where can I inform me about that.

Many thanks
Jul 17 '05 #1
1 1931
BjoernJackschina wrote:
Hello,
I want to test some input fields if the user has entered something.
That I do with a Javascript function. But I only know the form <form
action="ausg.php" method="post"> and so my function doesn't work
yet(it is initiated with onclick). What is a solution when I want to
retain my JAvaScript function because I think it is lesser
encumbrance.
Where can I inform me about that.

Many thanks


<html>
<head>
<script type="text/javascript">
function myJavascriptFunction(myform){
if(myform.input_field.value == ""){
alert("no input defined");
myform.input_field.focus();
return false;
}
}
</script>
<body>
<form method="post" action="ausg.php" onSubmit="return
myJavascriptFunction(this);">
<input type="text" name="input_field">
<input type="submit">
</form>
</body>
</html>

--
Justin Koivisto - sp**@koivi.com
PHP POSTERS: Please use comp.lang.php for PHP related questions,
alt.php* groups are not recommended.
Official Google SERPs SEO Competition: http://www.koivi.com/serps.php

Jul 17 '05 #2

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

Similar topics

4
by: TJ | last post by:
Dear PHP group, First question: I have an input form that upon pressing a button validates the values entered into this form. I am using the following code recall this form if there is an...
1
by: Oeln | last post by:
I've got the following issue: in one form (1.php), I get the number of inputs to offer, $input_cnt (it could be from 1-10, for example). In a for loop, I then offer that number of input fields in...
2
by: Rosebud | last post by:
Hello, I'd like some help trying to generate input fields on the fly. What I have on an HTML page is a single text input field labelled #1, e.g. #1 <input type="text">. Next to the field is a...
3
by: ShadowMan | last post by:
Hi I have a big form with a lot of input fields. I would use a pretty CSS to make page more readable: - what style do you use in this case? (label strictly near input field? fixed-size label? )...
9
by: Mike Minor | last post by:
Hello all... Is it possible to change the font size, color, and face of <input type=text> fields? Thank you, Mike Minor Z-Code Systems, Inc. mminorhsd@earthlink.net
1
by: Peter Kirk | last post by:
Hi there I have a form which submits a list of data to a web-application (which then saves to a database). The list consists of four input fields per row. Eg....
5
by: Bart van Deenen | last post by:
Hi all I have a form with a couple of input fields, embedded within spans. I am using script.aculo.us for dragging and dropping, and want to reorder the input fields that way. The input fields are...
2
by: Matt | last post by:
Hi, I'm ridiculously new to Access (about a week!) so please be patient! My database is a record of British Standards. Each has a unique identifier. Some are split into parts. I would like...
3
by: Adam Smith | last post by:
Hello, How does one adjust the input field size (height) in a form, say to accept 10pt rather than the 12pt txt that apparently is the norm. Thanks --Adam--
10
meenakshia
by: meenakshia | last post by:
hi forum:) i have a form in which i have four input fields for pieces to be entered and 4 fields for amount what i want is that the first pieces-t1 should be visible and rest three should not show...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...

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.