By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,963 Members | 1,261 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,963 IT Pros & Developers. It's quick & easy.

Show hide depending on the value of a select

P: 1
Hello,
I have a form with multiple seizures which to choose between various input occurrences in radio (only one choice possible). I would hope that if the user selected in a particular ca do that automatically appear in a form more in my jsp page
eg:
1 choice []
2 choice []
3 choices []
If you chose option 1 or option 2 ca just displays:
the value of the choice

If you chose option 3 ca automatically add:

Systolic: | ______ |
distolique: | ________ |
Lice: | _________ |
temperature: | _________ |

I tried with
Expand|Select|Wrap|Line Numbers
  1. etape2forward function () {
  2. $ ("# Etape2_forward"). Click (function () {
  3.  
  4. if ($ ("[name = 'etatVisuel']: checked") val () = 4.!)
  5. {
  6. $ ("# Systolic") hide ().
  7. $ ("# Digsystolique"). Hide ()
  8. $ ("# Lice"). Hide ()
  9. $ ("# Temperature"). Hide ()
  10. $ .ajax ({
  11. url: '/ GHopital / emergency / save'
  12. Type: 'POST'
  13. data: {"idPatient": $ ("# idPatient") val ().
  14. "EtatVisuel": $ ("[name = 'etatVisuel']: checked") val ().
  15.  
  16. },
  17. success: function (idUrgence) {
  18. window.location = "# / emergency / read /" + idUrgence;
  19. }
  20.  
  21. });
  22.  
  23.  
  24.  
  25.  
  26. }
But it does not work unfortunately.
Jul 4 '15 #1
Share this Question
Share on Google+
1 Reply


Dormilich
Expert Mod 5K+
P: 8,639
check your error console. there are lots of syntax errors happening.

PS. you have additional spaces all over the place causing HTTP and CSS errors as well.
Jul 4 '15 #2

Post your reply

Sign in to post your reply or Sign up for a free account.