I've created a form with several input fields. At the beginning of my
form I use a set of radio buttons to determine how to validate the form as
well as determine what fields are required. Because the form is so lengthy,
I would like to aid users by including visual clues as to what fields
require information by changing the background color of that field to red. I
understand how to accomplish this field by field however, I am looking for
an easier way. Rather that write a big messy function which declares
(document.form. name.style.back groundColor='re d') for every single field, I'd
like to be able to broadcast this command to several chosen fields at once.
Any suggestion would be greatly appreciated.
Best Regards,
Martin Franklin
-- MA********@cox. net 9 3432
"MA********@cox .net" <MA********@Cox .net> a écrit dans le message de
news:CNFfd.1952 7$SW3.507@fed1r ead01 I've created a form with several input fields. At the beginning of my form I use a set of radio buttons to determine how to validate the form as well as determine what fields are required. Because the form is so lengthy, I would like to aid users by including visual clues as to what fields require information by changing the background color of that field to red. I understand how to accomplish this field by field however, I am looking for an easier way. Rather that write a big messy function which declares (document.form. name.style.back groundColor='re d') for every single field, I'd like to be able to broadcast this command to several chosen fields at once. Any suggestion would be greatly appreciated.
Didn't understand very well, but maybe :
<input class="required " ...
"MA********@cox .net" <MA********@Cox .net> writes: I've created a form with several input fields. At the beginning of my form I use a set of radio buttons to determine how to validate the form as well as determine what fields are required. Because the form is so lengthy,
Why not make the form two steps? In the first step, they select a
radio button and submit the form. Depending on which radio button is
selected, they get a different form in the second step.
--
Chris MA********@cox. net wrote: I've created a form with several input fields. At the beginning of my form I use a set of radio buttons to determine how to validate the form as well as determine what fields are required. Because the form is so lengthy, I would like to aid users by including visual clues as to what fields require information by changing the background color of that field to red. I understand how to accomplish this field by field however, I am looking for an easier way. Rather that write a big messy function which declares (document.form. name.style.back groundColor='re d') for every single field, I'd like to be able to broadcast this command to several chosen fields at once. Any suggestion would be greatly appreciated.
Put the names of the required fields into an array and loop through it to
execute your above statement. This is a Javascript task, so if you need more
help you will find it in a Javascript group. This will be small and clean.
There is no way to change CSS properties of a group of fields globally but
changing them via Javascript.
HTH
Markus
On Wed, 27 Oct 2004 13:09:16 +0200, Markus Ernst <derernst@NO#SP #AMgmx.ch>
wrote:
[snip] This is a Javascript task, so if you need more help you will find it in a Javascript group. This will be small and clean.
Actually, the OP was directed from c.l.js because this would be better
handled with CSS. As Pierre suggested, something like:
.required {
background-color: #ff9f9f;
color: #000000;
}
<input class="required " ...>
would be more appropriate.
There is no way to change CSS properties of a group of fields globally but changing them via Javascript.
On some arbitrary run-time trigger, no there isn't, but I don't think
that's what the OP is looking for.
Mike
--
Michael Winter
Replace ".invalid" with ".uk" to reply by e-mail.
"Michael Winter" <M.******@bluey onder.co.invali d> wrote in message
news:opsgi5trii x13kvk@atlantis ... On Wed, 27 Oct 2004 13:09:16 +0200, Markus Ernst <derernst@NO#SP #AMgmx.ch> wrote:
[snip]
This is a Javascript task, so if you need more help you will find it in a Javascript group. This will be small and clean. Actually, the OP was directed from c.l.js because this would be better handled with CSS. As Pierre suggested, something like:
.required { background-color: #ff9f9f; color: #000000; }
<input class="required " ...>
would be more appropriate.
It would also be a static solution. He's asking for a dynamic solution,
where the appearance of the page changes depending on the user's initial
interactions. If someone directed him here from c.l.js, it must be because
he didn't understand this. There is no way to change CSS properties of a group of fields globally but changing them via Javascript.
On some arbitrary run-time trigger, no there isn't, but I don't think that's what the OP is looking for.
It's exactly what the OP said he was looking for. "At the beginning of my
form I use a set of radio buttons to determine how to validate the form as
well as determine what fields are required. Because the form is so lengthy,
I would like to aid users by including visual clues as to what fields
require information by changing the background color of that field to red."
[Cross-posted to c.l.js. Follow-ups set to c.l.js.]
On Wed, 27 Oct 2004 09:57:07 -0400, Harlan Messinger
<h.*********@co mcast.net> wrote: "Michael Winter" <M.******@bluey onder.co.invali d> wrote in message news:opsgi5trii x13kvk@atlantis ...
[snip] [...] something like:
.required { background-color: #ff9f9f; color: #000000; }
<input class="required " ...>
would be more appropriate.
It would also be a static solution.
To a certain extent, yes. Scripting could alter the class attribute
dynamically, but in that case, it would be best done entirely dynamically
(unless Chris' suggestion was used).
He's asking for a dynamic solution, where the appearance of the page changes depending on the user's initial interactions.
To be honest, I didn't read the entire original post, just the follow-up
in c.l.js that sent the OP here. I should have.
If someone directed him here from c.l.js, it must be because he didn't understand this.
Perhaps. You'd have to ask that person.
[Changing CSS rules] On some arbitrary run-time trigger, no there isn't, but I don't think that's what the OP is looking for.
It's exactly what the OP said he was looking for.
Then my mistake. I assumed the direction to ciwas was correct.
The optimum solution would depend on the structure of the form.
To the OP: do you have a URL to demonstrate the form?
[snip]
Mike
--
Michael Winter
Replace ".invalid" with ".uk" to reply by e-mail.
Markus Ernst wrote: MA********@cox. net wrote:
At the beginning of my form I use a set of radio buttons to determine how to validate the form as well as determine what fields are required.
Rather that write a big messy function which declares (document.form. name.style.back groundColor='re d') for every single field, I'd like to be able to broadcast this command to several chosen fields at once.
Put the names of the required fields into an array and loop through it to execute your above statement.
My recommendation: change the *class* through js, not the style. Use
external css to set up display rules for the various classes.
This is a Javascript task, so if you need more help you will find it in a Javascript group.
Agreed.
There is no way to change CSS properties of a group of fields globally but changing them via Javascript.
You can change appearances based on class, though. And it would keep the
presentation in one place -- an external css file -- while keeping the
dynamic stuff in another place -- an external js file.
--
Brian (remove "invalid" to email me)
"Harlan Messinger" <h.*********@co mcast.net> a écrit dans le message de
news:2u******** *****@uni-berlin.de It would also be a static solution. He's asking for a dynamic solution
(...)
Well I think mutch information is required to give any adapted answer...
Everyone, thanks for your help!
I ended using a combination of Java and CSS to accomplish this task. See my
OP and follow-ups on comp.lang.javas cript if interested.
Best Regards
Martin
"Brian" <us*****@juliet remblay.com.inv alid> wrote in message
news:5g******** *************@b gtnsc04-news.ops.worldn et.att.net... Markus Ernst wrote: MA********@cox. net wrote:
At the beginning of my form I use a set of radio buttons to determine how to validate the form as well as determine what fields are required.
Rather that write a big messy function which declares (document.form. name.style.back groundColor='re d') for every single field, I'd like to be able to broadcast this command to several chosen fields at once.
Put the names of the required fields into an array and loop through it to execute your above statement.
My recommendation: change the *class* through js, not the style. Use external css to set up display rules for the various classes.
This is a Javascript task, so if you need more help you will find it in a Javascript group.
Agreed.
There is no way to change CSS properties of a group of fields globally but changing them via Javascript.
You can change appearances based on class, though. And it would keep the presentation in one place -- an external css file -- while keeping the dynamic stuff in another place -- an external js file.
-- Brian (remove "invalid" to email me) This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Bil Muh |
last post by:
Esteemede Developers,
I would like to Thank All of You in advance for your sincere guidances.
I am developing a software using Visual C++ .NET Standard Edition with
Windows Form (.NET) template.
Briefly
--------------------------------------------------------------------------------------------
I need to create dynamically some controls on the forms, and display these
|
by: Nathan Bloomfield |
last post by:
Does anyone know if there is any documentation which relates to Access2k + ?
or can anyone help adjust the code?
I am having trouble converting the DAO references.
TITLE :INF: How to Create a Dynamic Crosstab Report
PRODUCT :Microsoft Access
PROD/VER:1.00 1.10
OPER/SYS:WINDOWS
|
by: mtech1 |
last post by:
Access 2002
I am trying to create a dynamic crosstab report that parameters come
from 3 different forms.
I get runtime error 3070 - The Microsoft Jet database engine does
not recognize 'Forms!frmDefaults!ProviderID' as a valid field name
or expression, and debug takes me to line 60 below.
Any Suggestions Would Be Truly Appreciated!
|
by: MikeY |
last post by:
Hi Everyone,
I am working in C#, windows forms.My question is this. All my button dynamic
controls properties are present and accounted for except for the"FlatStyle"
properties. I can't seem to figure out, if there is a way of using
polymorphic way (if that is a word) of doing this particular property. A
sample of my code is as follows:
DynamicControls.ButtonControl(this,btnSearchByName, new Point(5, 75), new
Size(95, 20),...
|
by: AdeelAlvi |
last post by:
iam working on a project called service desk that automates the departmental
services online .one major component i have to create is that to convert
paper based forms into dynamic webforms . i want to design a module that will
create dynamic web forms that will convert paper based forms into webforms.
help required ...
thankx in advance
--
Regards
Adeel Alvi
| |
by: deejayquai |
last post by:
Hi
I'm trying to produce a report based on a dynamic crosstab. Ultimately
i'd like the report to actually become a sub report within a student
end of year record of achievement. The dynamic sub-report will capture
what grades the student has achieved in a list of different subjects
and the reason I need it to be dynamic is that students take different
subjects.
Basically I've been trying to doctor the KB article on dynamic
|
by: RahimAsif |
last post by:
I am writing an application that requires the a portion of the main
menu to be dynamic. The menu has file, panels, view files and help
across the top. The view files sub menu needs to be dynamically
generated, and the dynamic generation needs to occur right when the
user selects this menu item (that is on the Popup event handler).
However, everytime I put following code on the Popup event handler (of
the View Files menuitem) to dynamically...
|
by: matt |
last post by:
hello,
i am on an interesting project. in this project, i have to create
dynamic data-entry forms for offline-users to fill out, save locally,
and eventually postback to our app (when back online). data validation
is required on the form.
i had looked at using PDF-forms for this.. Adobe's "LifeCyle Forms"
would work perfectly. with it one can pass in xml to their webservice &
get back PDF-form binaries. however, Adobe's pricing is...
|
by: JamesOo |
last post by:
I have the code below, but I need to make it searchable in query table,
below code only allowed seach the table which in show mdb only. (i.e. have 3 table, but only can search either one only, cannot serch by combine 3 table)
Example I have the query table below, how do I make the code to seach based on the query from this:
SELECT Product.ID, Product.Description, Quantity.Quantity, Quantity.SeialNo, Quantity.SupplierID,...
|
by: yomadhu |
last post by:
I created a dynamic form in javascript. Am unable to get those values in to php to display. I need all details. If i add 10 rows the i need to display those all values. Can any one help me for that code.
<HTML>
<HEAD>
<TITLE> Add/Remove dynamic rows in HTML table </TITLE>
<script type="text/javascript" src="script.js">
// JavaScript Document
var c=0;
|
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: 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: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
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: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |