Buttons from different form in one line.

S

showandbeshown

Hi,

How one can solve the following problem with the HTML. I have 3
buttons, the first 2 belong to the first form and the last button
belongs to the second form. I would like to put the first button on
the top (in the first line) and another two buttons, which belong to
different form, I would like to put on the bottom (in the second
line).

I tried do solve this problem with the usage of tabel:
<table><tr>
<td colspan="2"> [the 1st button]</td>
</tr><tr>
<td>[The 2d button]</td>
<td>[The 3d button]</td>
</tr></table>

However, the above construction cannot be validated because I use the
following ordering of the tags:
<td><form></td></form>

and the correcto ordering is:
<td><form></form></td>

Could you pleas help me to solve the problem?
 
J

Jukka K. Korpela

Scripsit (e-mail address removed):
How one can solve the following problem with the HTML. I have 3
buttons, the first 2 belong to the first form and the last button
belongs to the second form.

Just stop creating such problems, mm'kay? Such a setting is very
confusing. The user wouldn't know what each button "does".

As a rule of thumb, a page should contain at most one form. When
different operations are needed, use form fields to select an option and
write the form handler with corresponding branching in its code.
<td><form></td></form>

and the correcto ordering is:
<td><form></form></td>

So why do you use wrong syntax if you know the right one?

If you really think you want to create the problem, post the URL, and
someone will probably help you to find the right approach to the
original problem.
 
U

UKuser

Hi,

How one can solve the following problem with the HTML. I have 3
buttons, the first 2 belong to the first form and the last button
belongs to the second form. I would like to put the first button on
the top (in the first line) and another two buttons, which belong to
different form, I would like to put on the bottom (in the second
line).

I tried do solve this problem with the usage of tabel:
<table><tr>
<td colspan="2"> [the 1st button]</td>
</tr><tr>
<td>[The 2d button]</td>
<td>[The 3d button]</td>
</tr></table>

However, the above construction cannot be validated because I use the
following ordering of the tags:
<td><form></td></form>

and the correcto ordering is:
<td><form></form></td>

Could you pleas help me to solve the problem?

If you use multiple tables, I believe this will validate:

<form>
<table>
<tr><td colspan="2"> [the 1st button]</td></tr>
</table>
</form>
<form>
<table>
<tr><td>[The 2d button]</td><td>[The 3d button]</td></tr>
</table>
</form>

You could use CSS and spans/paragraphs.

Alternatively you may be able to use Javascript (so one form but the
action/target differs based on which button is clicked). I have used
this method and am currently using/working with a script but it needs
refining - I found it through google.

A
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,056
Latest member
GlycogenSupporthealth

Latest Threads

Top