Question

I have multiple tables on one HTML page. There is one input field and a submit button that are in placed in different tables. Inbetween them, there are other forms used as simple links that should look like ordinary buttons.

<form>
    <table>
        <tr>
            <td>
                <form action="/link1"><input type="submit" value="Link" /></form>
            </td>
            <td>
                <textarea name="I_need_that_to_be_sent"></textarea>
            </td>
        </tr>
    </table>


    <table>
        <tr>
            <td>
                <form action="/link2"><input type="submit" value="Link2" /></form>
            </td>
            <td>
                <input type="submit" />
            </td>
        </tr>
    </table>
</form>

What could be a good solution to get the input field submitted when the submit button is pressed and the links stay formatted as buttons? I do not want to use JavaScript. The following construction for the links to avoid the forms in between did not work:

<a href="link1"><button>Link</button></a>

Firefox did submit the form instead of calling the link. Thank you

Pas de solution correcte

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top