L
L
Loligan2016-05-23 14:12:43
Java
Loligan, 2016-05-23 14:12:43

How to send in JSP send request text with selected string from drop down list?

I have a form something like this:

<form action="myAction/" method="post">
    <p><select  size="3" multiple name="$hero">
        <option disabled>Выберитеoption>
        <option value="1">Один/option>
        <option value="2">Два</option>
        <option value="3">Три</option>
        <option value="4">Четыре</option>
    </select></p>
    <p><input type="submit" value="Отправить"></p>
</form>

How do I add a selected string to action/ to get something like action="myAction/2" ?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
E
Eugene, 2016-05-23
@zolt85

Replace action with GET, and you get something like myAction/&?$hero=1
Or use AJAX.

A
Alexander Kosarev, 2016-05-25
@jaxtr

Implement the necessary functionality with links, not select

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question