473,405 Members | 2,379 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,405 software developers and data experts.

Can a form have multiple resets where each affects only part of the form?

I'm creating a web-based authoring tool where one form encompasses
several sections for editing. I'd like each section to have its own
reset button, so that use of that button affects only that section.

I can't find anything in the 4.0 spec about how to do this, and the
only mention in this group I found is from 1998 below (CERN blocked my
email to Alan).

I've tried wrapping each section in its own fieldset, but that had no
effect.

Could anyone point me to an example where this is done?

-dp-

From 1998:
From: Alan J. Flavell (fl*****@mail.cern.ch)
Subject: Re: ATTN all: In HTML using images as "INPUT type="?

http://www.w3.org/TR/REC-html40/inte...ms.html#h-17.5

If you review the HTML3.2 spec that preceded it, you'll realise
that it didn't have a way of performing a (local) Reset function by
means of an image.

Jul 20 '05 #1
2 2156
"David Pautler" <dp**********@yahoo.com> wrote in message
news:26**************************@posting.google.c om...
I'm creating a web-based authoring tool where one form encompasses
several sections for editing. I'd like each section to have its own
reset button, so that use of that button affects only that section.

I can't find anything in the 4.0 spec about how to do this, and the
only mention in this group I found is from 1998 below (CERN blocked my
email to Alan).

I've tried wrapping each section in its own fieldset, but that had no
effect.

Could anyone point me to an example where this is done?


It's not possible with pure HTML only. However, you could implement a
Javascript solution, using an input with type="button". The onclick event
would trigger some code that would walk through the items and clear them
out, but even this approach requires that you know exactly what items you
want to walk through. And of course, the down side is that it wont work for
those people who have Javascript turned off.

An alternate solution might be to split the form into 3 different pages.

Good luck.
Peter Foti
Jul 20 '05 #2
On Tue, 25 Nov 2003, Peter Foti wrote:
"David Pautler" <dp**********@yahoo.com> wrote in message
news:26**************************@posting.google.c om...
I'm creating a web-based authoring tool where one form encompasses
several sections for editing. I'd like each section to have its own
reset button, so that use of that button affects only that section.
The only real solution to this is a server-based one, IMHO.

Irrespective of whether you stay with the single form, or break it up
into parts and transfer the information between the parts, the only
way that can be made to work for everyone is by implementing it on the
server side.

Once that has been done, you might consider a more convenient option
for users who consent to execute javascript, but in a WWW context I'd
have to counsel you to design this as an option, rather than making it
an essential part of using the form.
I can't find anything in the 4.0 spec about how to do this, and the
only mention in this group I found is from 1998 below (CERN blocked my
email to Alan).
Sorry, I don't have control over that. But anyway, it's better to keep
the discussion in public here on usenet, except perhaps where you're
just trying to clarify a personal detail that would be unlikely to
interest other readers.
I've tried wrapping each section in its own fieldset, but that had no
effect.

Some of the best-organised form-and-script combinations are based on
having the server re-write the form, for example the server filling-in
the details that have been accepted so far, prompting the user for
something more, or showing where they have input something
unacceptable, and taking them on to the next stage.

If you have that sort of structure, then you can easily have a button
that submits to the server with a request to re-initialise a field,
and the server then write a new form. It isn't technically a "reset"
in the HTML forms sense, but from the user's point of view that is
essentially what it does.

Sure, I agree, server-side takes extra time to respond, and involves
server load, but at least it's under your own control in a way that
javascript never can be (think: version incompatibilities and bugs).
Quite apart from also working for users who got their fingers burned
by some malicious javascript, and resolved never to enable it again...
It's not possible with pure HTML only.
Well, in any case, a form is not of very much use in a WWW situation
without a server script to evaluate it. Most of the work of designing
a form really goes into designing the evaluation of what's submitted.
By comparison, the writing of a few HTML tags is fairly trivial, if I
might say so.
However, you could implement a
Javascript solution, using an input with type="button".
You're jumping out of the frying pan into the fire here...
The onclick event would trigger some code that would walk through
the items and clear them out, but even this approach requires that
you know exactly what items you want to walk through. And of
course, the down side is that it wont work for those people who have
Javascript turned off.
Right. And worse, the implementation of the "button" element is not
good in general, and severely broken in MSIE (who have the affrontery
to state on their developers' page that the button element is in the
HTML4 standard, while saying nothing about the fact that what they
have implemented doesn't follow that standard.)[1]

So you might be well advised to limit the use of <button>s to
javascript-generated content (DHTML), where it can do its onclick
thing for the JS-enabled users while staying completely out of the way
for those who have JS off.
An alternate solution might be to split the form into 3 different pages.


Indeed; or just three different forms on the same page; but you still
need the server-side scripts to drive it, right?

NB the above was all just tentative. Without knowing more about what
is really supposed to happen, I couldn't start to make recommendations
about which kind of approach I'd want to follow in practice. But I
stand by my principle that there must be a (basic) working server-side
script behind it all, and any Javascript conveniences offered should
be optional extras.

hope this helps.

[1] at the foot of the page:
http://msdn.microsoft.com/workshop/a...cts/button.asp
Jul 20 '05 #3

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

Similar topics

3
by: RC | last post by:
I am try test a simple HTML form with PHP <form method=POST action="testing.php"> Cat <input type="checkbox" name="pet" value="cat"> Dog <input type="checkbox" name="pet" value="dog"> Pig...
12
by: Forti2ude | last post by:
Hello, I have a simple form... <form> <select name="foo" multiple> <option value="1">one</option> <option value="2">two</option> <option value="3">three</option> </select>
0
by: Pat Patterson | last post by:
I'm having serious issues with a page I'm developing. I just need some simple help, and was hoping someone might be able to help me out in here. I have a form, that consists of 3 pages of...
3
by: D. Shane Fowlkes | last post by:
Sorry for the length of this post. I have created a rather complex form which has a header/line item (parent and child records) structure. It's for an intranet. A screenshot can be seen here: ...
0
by: rbmako69 | last post by:
I have a large html table and form, for displaying data and for updating the record data. To make this form look really good, i'm deciding to convert the html form into flash. The page has one...
5
by: Zytan | last post by:
Is it possible (I doubt it) to have multiple default buttons in a form? I have several group controls in a single form, and when the focus is within one of the group controls, I want a specific...
2
by: Thirdworld | last post by:
Is it possible to use multiple tables in a single form without using sub-forms? I want to be able to input information that goes to multiple tables at the same time. I can post a design of what I'm...
5
by: billa856 | last post by:
Hi, My project is in MS Access 2002. In that I want to open one form multiple times. I put one button on my main form. Now whenever I click on that button than form will be open. Now when I...
7
by: gmiotke | last post by:
I know that this is easy for those that know but alas this is not me ;) I have a multi part form that is going to write to a dB. As a point of reference I can offer geico.com (i.e., the quote...
3
by: falonso | last post by:
How can I do build a multiple-choice exam using a form with radio buttons. question No. 1 Answers: yes: value=2 maybe: value=1 No: value=0 question No. 2 Answers: yes: value=2 maybe:...
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
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
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,...
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
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,...

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.