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

Dynamic Validation not doing what (I think) it should

Hi,

To understand the problem, a small description of the situation should
be provided:

I have a Field Control that is made of a one row table with three
columns. The table width is 100%, the first column is 40% and the other
two have a width of 30%. The middle cell has a TextField with 100% width
followed by a requiredValidator (display set to dynamic).

When i submit a empty value, the validation increases my table height to
fit the error message, which is expected.

The weird thing now is that it also increases my table width! One could
think that the error message doesn't fit it horizontally without the
width increase, but unfortunatly it's not that simple since it does the
same thing no matter the size of the error message, even with a single
word error message.

I can't seem to find any explanation for this phenomenon or a way to
avoid it.

Luis

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 19 '05 #1
1 1193
Focus on the HTML generated. After all, everything ends up creating HTML or
using Javascript to programmatically modify HTML. In the case of a validator
with Display=Dynamic, you need to know the following:
1. A validator is enclosed in a <span> tag with the error message appearing
as the innerHTML: <span>error message</span>.
2. Display=Dynamic uses the style attribute's display and visibility
properties. style="visibility:hidden;display:none" ->
style="visibility:inherit;display:inline". So understand those style
properties.
3. Whatever tags enclose your validator have their own rules. For example,
when a dynamic validator is inside <p> and </p> tags on its own line, when
shown <p> tags suddenly use more vertical space.

I hope this helps.

--- Peter Blum
www.PeterBlum.com
Email: PL****@PeterBlum.com
Creator of "Professional Validation And More" at
http://www.peterblum.com/vam/home.aspx

"Luis Ferrao" <lf*@undisclosed.com> wrote in message
news:Of**************@TK2MSFTNGP10.phx.gbl...
Hi,

To understand the problem, a small description of the situation should
be provided:

I have a Field Control that is made of a one row table with three
columns. The table width is 100%, the first column is 40% and the other
two have a width of 30%. The middle cell has a TextField with 100% width
followed by a requiredValidator (display set to dynamic).

When i submit a empty value, the validation increases my table height to
fit the error message, which is expected.

The weird thing now is that it also increases my table width! One could
think that the error message doesn't fit it horizontally without the
width increase, but unfortunatly it's not that simple since it does the
same thing no matter the size of the error message, even with a single
word error message.

I can't seem to find any explanation for this phenomenon or a way to
avoid it.

Luis

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 19 '05 #2

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

Similar topics

2
by: megabyte | last post by:
Hello; I have an ASP application which gathers information to put in a database via some forms - I would like to do the form validation (making sure some fields are not empty) with a Javascript...
1
by: Mike George | last post by:
I am having a problem with dynamic validation controls. I have some code that uses an XSLT to transform an XMLDocument into HTML which creates ASP.NET validation controls dynamically (v 1.1). ...
2
by: Shathish | last post by:
Ha i have this problem with the validation control I have a asp.net page which is used to add and edit projects when i'm adding a project the validation controls are working fin but if i select a...
6
by: Stephen | last post by:
Hi, the validation controls dont work on Netscape or Mozilla and only on Internet Explorer why? How do i correct this problem? Thanks
6
by: mcgrew.michael | last post by:
I hope this is the right group. I am very new to ASP so this is probably a stupid question. I have some vbscript that query's AD and populates a recordset. I know the recorset contains the...
0
by: Steve Funk | last post by:
All, I have searched all around and have not yet found the answer to this nor a solution. Hopfully it will be easy to overcome. Here is what I am trying to do: I'm trying to build a wizard...
1
by: Yitzak | last post by:
Hi I did my first web site/app recently using asp. Although I found the language easy, the end result compared to a typical client/server app v.messy. My inexperience probably contributed to...
9
hgeithus
by: hgeithus | last post by:
Hi. I'm doing a form at my website, and I found this document which is very interesting: Javascript form validation - doing it right . I have a little question though. All the documents within my...
0
parshupooja
by: parshupooja | last post by:
hey all, I have DataTable binded to Gridview . This Datatable contains Data from Database. Before binding it to Gridview I am adding extra line with few controls dynamically in it such as text...
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,...
1
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...
0
agi2029
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,...
0
isladogs
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...
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...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.