I am working with JSP and I have a HTML form in which I have a button at the top which is Process button. Now if I click on that Process button, it shows me a form which has two radio button - TestClient
and TestServer
.
It also has Submit
button in that form.
Here is my JSFiddle.
Now what I am trying to do is - As soon as I click on TestClient
radio button, I need to type in firstName
textbox and lastName
textbox before pressing Submit button. Meaning these two textbox are mandatory for TestClient
radio button and if somebody has typed in third textbox for TestClient
radio button, then it should show error message next to that textbox. But If I am clicking TestServer
radio button, all the three textbox are mandatory, meaning I need to type in something in all the three textbox.
May be, I can use disable Submit button feature as well if certain conditions are not met along with the proper message next to the textbox?
I am new to jQuery so still learning.
I think the best thing to do here to avoid confusing your users would be to hide()
the unnecessary field like this. When the TestClient
button is selected, the address
field is hidden, but when the TestServer
button is selected, it is shown. This avoids confusion with which boxes to fill in: people tend to dislike error messages, even if they are phrased kindly.
I have implemented zoom in Raphael using the setViewBox() technique. When I keep zooming the view box becomes bigger than the paper canvas size and the elements on the diagram are no longer visible. ...
I have implemented zoom in Raphael using the setViewBox() technique. When I keep zooming the view box becomes bigger than the paper canvas size and the elements on the diagram are no longer visible. ...
Trying to find a way to inline the creation of an array of data given its size, i tried var n = 4; var data = (new Array(n)).map(function(x) { return 1 }); which gave me [undefined, undefined, ...
Trying to find a way to inline the creation of an array of data given its size, i tried var n = 4; var data = (new Array(n)).map(function(x) { return 1 }); which gave me [undefined, undefined, ...
I have question regarding form submit. I have this simple form on processFabrication.php to submit all the variables then process it to the database in another page called processExceededQty.php Co, ...
I have question regarding form submit. I have this simple form on processFabrication.php to submit all the variables then process it to the database in another page called processExceededQty.php Co, ...
I am trying to generate a username by using the slice method. I am trying to use the users First name and last name to generate a username. Can't seem to make it work. Where am I going wrong? <...
I am trying to generate a username by using the slice method. I am trying to use the users First name and last name to generate a username. Can't seem to make it work. Where am I going wrong? <...