Hi.
I have an hmtl page with a function to see if there are any input text
boxes. If so, that means a user did not complete them (once entered,
my xsl stylesheet makes them text instead of text input boxes, so
there should be NO input boxes when the user is clicking the FINISH
button. However, the FINISH button script still indicates that input
boxes exist...new to this...return false issue? Is there a better way
to do this? I also need to send a querystring or form collection for
(hidden_birth2. aspx?finish=yes ). I couldn't get the script right to
open the page with querystring from the function, so I ended up doing
it with this <form> element...proba bly not the best way. Any help
appreciated! Thanks. Kathy
function CheckInput()
{
var cnAll = document.all;
for (var i=0;i<cnAll.len gth;i++)
{
if(cnAll(i).tag Name=='INPUT')
{
alert("You must first complete and SAVE all user inputs!");
return false; }
}
}
HTML snippet:
<form action="Hidden_ Birth2.aspx" method="post" onsubmit="retur n
CheckInput();">
<input type="Submit" name="finish" value="FINISH">
<b>Click the FINISH button when work instruction is complete.</b>
</form> 4 1965
> HTML snippet:
<form action="Hidden_ Birth2.aspx" method="post" onsubmit="retur n CheckInput();">
I think you need the capital S for it to work ......... but I could be wrong
onSubmit="retur n validate();"
"Chris Leonard" <c.************ *@btinternet.co m> writes: I think you need the capital S for it to work ......... but I could be wrong
onSubmit="retur n validate();"
You are wrong.
In HTML, the case of the letters doesn't matter.
In XHTML, and in Javascript, the on<event> handlers are written in
all lower case.
/L
--
Lasse Reichstein Nielsen - lr*@hotpop.com
Art D'HTML: <URL:http://www.infimum.dk/HTML/randomArtSplit. html>
'Faith without judgement merely degrades the spirit divine.'
Are you sure your for loop isn't detecting the "input type submit" ?
Might be worth checking the cnAll(i).type as well.
Also, I think your event handler might need to return true.
Hope that helps,
Ron
Ugh, just realized that I should have other input boxes just not
type=TEXT boxes...could someone help me with testing for input elements
where type=TEXT?
Thanks!
Kathy
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it! This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Sue |
last post by:
After finishing up my first quarter JavaScript on 12/12/03, I decided
to improve character checking on my project. In my project I only had
to do very basic validation. Therefore, I only had one function to
verify the name fields, age, email and gender.
My question is: if I create a function for each field like the code
below, what would be the best way to organize the functions and call
them? Would I need one main function and place...
|
by: GIMME |
last post by:
Background ...
I've created a web application that allows a user to create an
HTML application from IE.
The application itself creates an XML representation of a XHTML
form. The XHTML representation can be saved as a string and recreated.
(The application also has a crude workflow aspect - so XMHTML forms
can be created and assigned a workflow. Forget I said anything about
|
by: Madha K |
last post by:
I am developing a web application that need to support UTF-8
characters.
For client side validations, can javascript be used to handle UTF-8
characters.
1) How javascript can be used to restrict non-utf8 characters?
2) Using javascript how to find the lengh of a string having unicode
characters?
e.g: For a field Name on the form, there is a corrosponding field Name
varchar2(10) in DB. Through my application when i try enter 10 normal...
|
by: francisco lopez |
last post by:
ok , first of all sorry if my english is not so good, I do my best.
here is my problem:
I don´t know much javascript so I wrote a very simple one to validate
a form I have on my webpage.
could you please have a look at the following script:
------------------------------------------------------------
|
by: Steph |
last post by:
Hello,
Can someone tell me the script to use for having a change on the same page
when using checkbox function ?
For example, i would to check one condition and display dynamically a button
if the condition is checked on the same page.
Thanks in advance for your help
| |
by: x muzuo |
last post by:
Hi guys,
I have got a prob of javascript form validation which just doesnt work
with my ASP code. Can any one help me out please.
Here is the code:
{////<<head>
<title>IIBO Submit Page</title>
</head>
<style type="text/css">
|
by: KL |
last post by:
Is there a way to redirect with javascript? I used javascript to do
some validation on a form, but the form was set to redirect back to the
index page after the submit button was clicked. So what I want to do
is to say if it passes validation, then redirect, but if it doesn't
pass, I want it to stay on the page so the user can fix the problems
and click submit again. Can I even do this in javascript?
--
KL
|
by: Mick Walker |
last post by:
Hi,
I have a problem that I have been trying to figure for a couple of days,
and am wondering if anyone out there would be so kind as to give me a
solution. (Deadline time)
I am trying to validate a form. Its quite a simple form, but I am a wee
bit stuck. Baically it consists of 9 text input fields and a select
element. All elements on the form, have to have a value in them
(manditory), BUT 2 items (txtEmail, and txtDOB) have to match...
|
by: emily224 |
last post by:
Hello,
I have been trying to understand this source code, which I retreived from my online course test. I would like to know how to find the answer for the question on the test. Im sure the answer must be embedded somewhere in the source code, and I would like to know if anyone knows where to find the correct answer.
I would greatly appreciate it!!
Thanks!!
|
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...
|
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,...
| |
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...
|
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...
|
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,...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
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...
|
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
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |