473,412 Members | 1,973 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,412 software developers and data experts.

hidden field and validation (JSP)

I am trying to do validation on a hidden field, but it doesn't seem to
be working -
all the other non-hidden fields do

Is this indeed not possible? I am using a JSP tag for the hidden field

} else if (form.primaryContactPIN.value=="") {
alert('You must specify a Primary Contact');

<html:hidden name="ideaForm" property="primaryContactPIN" />

Jul 20 '05 #1
1 6703
In article <3F***************@visi.com>, to****@visi.com enlightened us
with...
I am trying to do validation on a hidden field, but it doesn't seem to
be working -
all the other non-hidden fields do

Is this indeed not possible? I am using a JSP tag for the hidden field

} else if (form.primaryContactPIN.value=="") {
alert('You must specify a Primary Contact');

<html:hidden name="ideaForm" property="primaryContactPIN" />


Sure, but why?
Hidden fields almost never change, unless you as the programmer change
them.

Take a look at your html source (view source in browser) and make sure
that the hidden field is indeed in the form between the form tags.

Oh, and calling a variable "form" is bad practice. Use something the
browser doesn't use, like "frm".
-------------------------------------------------
~kaeli~
All I ask for is the chance to prove that money
cannot make me happy.
http://www.ipwebdesign.net/wildAtHeart
http://www.ipwebdesign.net/kaelisSpace
-------------------------------------------------
Jul 20 '05 #2

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

Similar topics

8
by: Matt Herson | last post by:
I have been trying to find a way to use JavaScript to change the value of a hidden field on submit. I am already invoking a JavaScript to handle the validation on submit. The reason I need to...
1
by: Omar | last post by:
Hi, In my JSP file I have: <input type="hidden" name="campo" value="<%= campo %>"><br> <input type="hidden" name="valor" value="<%= valor %>"><br> <input type="hidden" name="anterior"...
6
by: Omar | last post by:
Hi, In a JSP I have the next: .... codigo = "<select name='" + nombre + "'>\n<option selected value='default'>Escoge</option><option value='todos'>Todos</option>"; if (miRS != null) while...
1
by: tllcll | last post by:
Hi, I would like to find out how to handle the following: I retrieve the data from the database by calling javabean and return the data back to the same jsp page and then display those values...
6
by: Bill Cohagan | last post by:
Is it possible to have a validation control whose ControlToValidate is in fact a hidden control? When I try this I find that the validator apparently does not fire. If I make the control...
2
by: Gobind | last post by:
Hello I have been working on this for quite some time now, and have no clue why my app behaves the way it does. Here is the code snippet that controls this behaviour....
1
by: jamestpaul | last post by:
I'm having some difficulty with Safari users and hidden fields in my .NET 2 asp application. There is a hidden field that gets loaded with the contents of a div in my form. When the user submits...
6
by: gavy7210 | last post by:
hello i am using struts 1.2,Eclipse Platform Version: 3.4.2,mySql 5.0.1,jdk 1.5.. i have a login form(jsp) in which a user logs in,in case he doesnt enter his username and/or password an error...
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: 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
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
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
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

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.