Jsp which button is clicked




















In JSP page I created tables and buttons inside a loop. Expand Select Wrap Line Numbers. Follow Post Reply. You have 4 buttons each with the same name "name" and same value "Click".

Use that index i to name your buttons and values as well. Post Reply. Similar topics Javascript. How do you know what button was pressed in the submit? Can't get button to stick. Please Help! How to identify which button was clicked?

Forum: Servlets. Artemesia Lakener. Optional 'thank-you' note:. However, I read one response thread and it says it can also be handled by the server side using servlet. I don't know how. Could someone tell me how to use servlet to find out which action button is clicked and how to pass different action names? Adeel Ansari. You can use a hidden field for this purpose.

Thank you very much for your suggestion. Pls review the code below and suggest whether I am doing anything wrong : import java. In the ProcessButtons servlet, you have the following statement nested within your if statements: out. I see nothing else wrong with your code.

Do you get any output at all? Appalaswamy Akasapu Posted October 17, 0 Comments. Thanks again for prompt reply. I get output as following when submit 1 selected: submit 1 selected Submit2 selected: As you can see from above both buttons are selected. Thanks again for all you help. I would delete the existing ProcessButtons. Hello I deleted the class files and compiled again. But the result is same as before. I am using Java 1. Could you let me know your test environment?

Thanks a lot. Nilesh Bhatt Posted October 22, 0 Comments. I have used Tomcat 5. I should work. PrintWriter; import javax.

In a real site, you'd have to provide this information in a way that doesn't intefere with the site design for example by providing an easily accessible link that points to information on what the site accesskeys are. To disable a button, specify the disabled global attribute on it, like so:. You can enable and disable buttons at run time by setting disabled to true or false. In this example our button starts off enabled, but if you press it, it is disabled using button.



0コメント

  • 1000 / 1000