I am currently handling a project involving a Spring Controller and JSP. Within a JSP page, I have included a button labeled Process
. Upon clicking this button, two radio buttons are displayed below it along with a Submit
button.
After tapping the Submit button, assuming everything goes smoothly, the following data is exhibited (which will be retrieved from the controller):
Success= true
Error= none
However, upon inspecting my layout on the browser via the provided jsfiddle link, the form appears as follows:
Process
Success=
Error=
This indicates that the form initially displays the "Process" button at the top, followed by empty "Success" and "Error" labels since no values have been supplied yet from the controller. This presentation may appear awkward to users.
Hence, my aim is to either conceal the "Success" and "Error" labels upon page load or when the Process button is clicked. These labels should only become visible once the submit button is pressed, providing their relevant values for "Success" and "Error" based on the controller's output.
Is it feasible to achieve this using jQuery? To clarify, I intend to hide these labels until the submit button is triggered...
Alternatively, I welcome suggestions for a more effective design approach to display the Success and Error labels in accordance with my objective.