473,466 Members | 1,464 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Complex server-side rules with QuickForm

Hi All,

I am wanting to do "complex" server-side JS validation. I put "complex" in
quotes because complex is of course in the eye of the beholder.

What I would like to do is actually fairly simple in theory. We have a drop
down box, and a text box. We ask the user for their favorite color, and the
options in the drop down box are red, green, blue, or other. If they choose
red, green, or blue, then the text box is grayed out (disabled='disabled'
attribute is set for the <input> tag). If they choose other, then the text
box becomes available for them to input their favorite color in.

Is there a way to do this with QuickForm without resorting to hand-coding
all the JS? I have a vague sense that I once saw a tutorial on how to do
this, but I've been googling for it and not been able to turn anything up.
I would be very grateful for any tips!

Sincerely,
-Josh
Jul 17 '05 #1
2 1574
I am not familiar with QuickForms but it sounds like you require a
JavaScript solution.

This would then be a client side action. If you are trying to avoid
using a scripting language then I am not sure if it is possible the way
you describe.

You could get them to choose and submit and check if it is other, and
if so on the next page ask them for input as to what it is.

Alternatively you could give them an enabled <input> text box in case
they choose other and only read this value if they have chosen other.
Else just use the value in the drop down menu.

Hope this is clear for you and that it helps.

Jul 17 '05 #2
I said server side when I meant client side - obviously the JS for this
needs to be client side.
Jul 17 '05 #3

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

Similar topics

2
by: burdeen | last post by:
I've been trying to return an array with PHP5 soap. Is this not supported? or am i doing it wrong? Seems to return on the last element in the array. In my WSDL i've defined my return type as a...
4
by: Starbuck | last post by:
OK, first let me say that I am no DB person. But I have a user here who keeps getting this error whenever she does, whatever it is she does, with databases... A google search takes me to...
0
by: mjcsfo | last post by:
I can't seem to find a reference nor any helpful threads on this topic. I've gotten the following error in two circumstances: 1. A complex type has nested within it another complex type, in the...
3
by: Arthur | last post by:
Spending the morning avoiding responsibilities, and seeing what it would take to color some complex numbers. class color_complex(complex): def __init__(self,*args,**kws):...
5
by: HQM | last post by:
If I create an element X of a primitive type with minOccurs=0 and nillable=true and run it through the WSDL generator I get a class with a property "X" of the primitive type plus a boolean...
116
by: Mike MacSween | last post by:
S**t for brains strikes again! Why did I do that? When I met the clients and at some point they vaguely asked whether eventually would it be possible to have some people who could read the data...
1
by: Daxter77 | last post by:
PHP 5.2.2 Apache 2.2 Windows XP (dev environment) I'm attempting to set up a soap server in PHP 5 and I've been succesfull in getting a simple function to work, the problem is I want to return...
6
by: Jon Bilbao | last post by:
I´m trying a select clause in two steps because it´s too complex. First: SELECT Reference, Results.idEnsayo, Results.Num_taladro, min(Results.dTime) + 500 AS tIni, max(Results.dTime) - 500 AS...
1
by: RoRo | last post by:
>I'm fairly new to SQL server 2005
2
by: =?Utf-8?B?c2lwcHl1Y29ubg==?= | last post by:
Have a complex process where I need to Import a large amount of data then run some transformations on this data then import into DataBase. The transformation involves multiple fields and multiple...
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...
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
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
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
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?
0
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 ...

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.