works fine written this way :
blah blah blah
function validateForm(){
if(document.form1.ani.value == ""){
alert("Please enter an ANI");
return;
}
document.form1.submit();
}
Please enter ANI for query:
ANI
- Original Message -
From: "epyon
Thank you Matt and Peter for the suggestion. It works!!!
- Original Message -
From: "Peter Guyatt" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Tuesday, October 21, 2003 10:42 AM
Subject: RE: JSP question
> Hi There,
>
&g
alker Chris" <[EMAIL PROTECTED]>
To: "'Tomcat Users List'" <[EMAIL PROTECTED]>
Sent: Tuesday, October 21, 2003 10:45 AM
Subject: RE: JSP question
> Most likely "document.form1" is not visible in the browser object model.
> There are various w
Most likely "document.form1" is not visible in the browser object model.
There are various ways to address the form, but the most portable in this
case is probably "document.forms[0]".
Chris
-Original Message-
From: epyonne [mailto:[EMAIL PROTECTED]
Sent: 21 October 2003 16:35
To: Tomcat
Hi There,
Why dont you change the button back to a submit and then add a
onSubmit='return validation();' to you form ?
Thats what we do
Eg.
function valid () {
if (document.form.val.value.length < 1) {
alert("Please enter a value");
A better solution for what you're doing is to leave the button as
type="submit" and remove its onclick event. Instead, add an "onsubmit"
handler to form that calls "return validateForm()" - return false in your
function when validation fails.
HTH,
Matt
-Original Message-
From: epyonne [
redirect to individual jsp pages based on
applicationJar.getPageName() instead of including dynamic content in a common page
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, January 08, 2003 3:16 PM
> To: [EMAIL PROTECTED]
> Su
I may be referring to an oldschool version of tomcat but the include
directive occurs during compilation, not execution. So to do what you want
you'd have to say
<% if(goo){%>
<%@ include file="filenameA" %>
<% }else{ %>
<%@ include file="filenameB" %>
<% } %>
or
do
> -Original Message-
> From: Luc Foisy [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, January 08, 2003 1:54 PM
> To: Tomcat User List (E-mail)
> Subject: JSP Question
>
>
>
> I am trying to use <%@ include file="filename" %>
>
> I am sending to the page that has this with the line:
> r
Assuming you have a controller servlet that could load
the hint text from the database, why not have a static
hashtable in your servlet code that is initialized with
the values from the database in the init() method. Then
as each session is initialized, you could put a reference
to the hashtable i
http://www.servlets.com/cos/index.html
These classes will get you the upload part.
-Original Message-
From: Magnus Jansson [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 01, 2002 9:20 AM
To: [EMAIL PROTECTED]
Subject: OT: jsp question about uploading images to a database
I want to in
Two quick ideas:
1. Include in each of your forms a html hidden tag that has a name value
that will be common for each form, and a value dependent on the identity of
the form. Then you can get from the request object the expected key value
and find the form.
2. If every one of your forms
12 matches
Mail list logo