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

one form per row - possible?

I'm trying to set up an HTML table such that each row can have its own
HTML form that spans multiple cells.

Does anyone know a standards-compliant way of doing this?

-Felipe Gasper

--
Quidquid latine scriptum sit altum viditur.

Si hoc legere scis, nimis eruditionis habes.
Jul 20 '05 #1
4 5939
Felipe Gasper <fg*********************@uiuc.edu> wrote:
I'm trying to set up an HTML table such that each row can have its own
HTML form that spans multiple cells.
Why?
Does anyone know a standards-compliant way of doing this?


There is none. A table row, <tr> element, can be contained in a form,
<form> element, only if the form contains the entire table, <table>
element, in which the table row appears as a subelement. This is direct
consequence of HTML syntax.

I don't know what the purpose is, but you could use a set of single-row
tables, each contained in a form of its own. The appearance of the set
would not be tabular-looking by default, since a browser would allocate
widths for the cells in one table irrespectively of allocation of other
tables. But using CSS you could specify the widths in a manner that might
produce a tabular look. The details really depend on what the cells
contain.

--
Yucca, http://www.cs.tut.fi/~jkorpela/
Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html

Jul 20 '05 #2
"Jukka K. Korpela" <jk******@cs.tut.fi> a écrit dans le message de
news:Xn*****************************@193.229.0.31
I'm trying to set up an HTML table such that each row can have its
own HTML form that spans multiple cells.


Why?


It's a very common use :

Product list

A <Modify> <Delete>
B <Modify> <Delete>
C <Modify> <Delete>
....

Felipe, if this is exactly your case, you can rename you submit buttons and
include an line identifier in it ! Having a single form in each row works
pretty well in every browser but is not conforming to the W3C
recommendations, as said Jukka.

Jul 20 '05 #3
"Pierre Goiffon" <pg******@nowhere.invalid> wrote:
Product list

A <Modify> <Delete>
B <Modify> <Delete>
C <Modify> <Delete>
...

Felipe, if this is exactly your case, you can rename you submit
buttons and include an line identifier in it !
Yes, indeed (though it's logically a _product_ identifier then).
Put everything inside one form, and include suitable values for the
submit buttons so that they can be distinguished. But beware: problems
arise whenever there is a text input field in a form containing multiple
submit buttons. (What happens when the form is submitted by hitting Enter
in the text field?)

Alternatively, in situation like the one above, it might also work to
make each cell contain one form (which might contain just one submit
button). This however is not feasible if other information than an action
indicator needs to be passed.
Having a single form
in each row works pretty well in every browser


I wouldn't be so sure. Have you really tested _every_ browser?
But it seems that we agree that it's better to write valid markup and
recognize which button was used.

--
Yucca, http://www.cs.tut.fi/~jkorpela/
Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html

Jul 20 '05 #4
"Jukka K. Korpela" <jk******@cs.tut.fi> a écrit dans le message de
news:Xn*****************************@193.229.0.31
Product list

A <Modify> <Delete>
B <Modify> <Delete>
C <Modify> <Delete>
...


Put everything inside one form, and include suitable values for the
submit buttons so that they can be distinguished. But beware: problems
arise whenever there is a text input field in a form containing
multiple submit buttons. (What happens when the form is submitted by
hitting Enter in the text field?)

Alternatively, in situation like the one above, it might also work to
make each cell contain one form


Jukka, thanks very mutch for your answer : after sending my first message I
was thinking I had forgot to write these two points you cite here. Well, I
don't need to repost then :)
Having a single form
in each row works pretty well in every browser


I wouldn't be so sure. Have you really tested _every_ browser?


Well, obviously nobody can say it works for every configuration on earth.
But this technique was really often used in web applications in the past
years, and I personnaly used it from time to time - that was before 2000,
before web standards became really affordable and usefull. I just point this
because it's used in a lot of web pages - I think it's better to know that
it works but it's not good and that's there are standards workarounds that
not to mention it.

Jul 23 '05 #5

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

Similar topics

3
by: CAD Fiend | last post by:
Hello, Well, after an initial review of my database by my client, they have completely changed their minds about how they want their form. As a result, I'm having to re-think the whole process....
3
by: Adam Benson | last post by:
Hi, I have a really simple web page with c# code behind it. It displays news headlines with related text. Click on the headline and you get the text that goes with it. I need to implement a...
2
by: AGagliardi | last post by:
I am running ASP.NET on a Windows 2000 Server and for some reason, despite the fact that aspx pages load and render just fine, when a user tries to submit a web form (form runat="server") it...
4
by: raj_genius | last post by:
I hav two queries, whc are as follows: FIRSTLY: is it possible to access the controls(by name) of a parent form(MDI) from its child forms??if yes then how??plzz provide a coded example in VB if...
13
by: salad | last post by:
Operating in A97. I didn't receive much of a response conserning Pivot tables in Access. Pivot tables are nice, but a CrossTab will work for me too. Using a Pivot table, one is actually...
0
by: Racqetsports | last post by:
Hi there, In a gradebook database, student grades must be computed from 2 scores: a Daily grade, and then scores from Assignments. Knowing about nested forms, I am requesting direction on how to...
3
by: =?Utf-8?B?UmljaA==?= | last post by:
I want to create a class library project (dll) for use with a com app. The idea is to use .Net objects in com. I also want to include a SaveFileDialog in the class library. Is it possible to...
10
by: mbatestblrock | last post by:
I dont know if this is possible.. I have a form frmCustomers with a subform sfrmCustomers and in the subform I have a unbound text field in the footer txtCOUNT with the control source of ...
16
by: blaze77 | last post by:
Hi, I'm somewhat of a power user in excel and a newbie to Access though the possibilities are exciting me :-) I am trying to create a tool in Access to replace an existing tool in Excel. My...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.