Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Please help me regarding the forms selection

 
Ravi kumark
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Guys,

I am just registered here.Thank you one and all for the support.

I have a html form which has many radio buttons and each radio button has some checkboxes.I have to display a particular form based on the radio button selection and checkboxes of that radio button. How can I do this? Can this be done using JavaScript.? Please help me


Thanks a lot!
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64971
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Certainly JavaScript would be useful for this.
 
Ravi kumark
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you very much.Will start learning
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64971
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Be sure to include CSS in your studies. It's easy to use CSS to hide and show elements on the page under JavaScript control.
 
Ravi kumark
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sure Bibeault .Thank you so much!
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64971
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You're welcome.

A bit of etiquette: in Western cultures it is considered rude to call someone by just their last name. It would be proper to call me "Bear" informally, or "Mr. Bibeault" to be more formal. Here on the Ranch, the informal greeting is OK.
 
Ravi kumark
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
oh my god..I am really sorry Mr.Bibeault .I donot know that.Thank you very much for letting me know this.Please dont mind.

 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64971
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ravi kumark wrote:oh my god..I am really sorry Mr.Bibeault .I donot know that.Thank you very much for letting me know this.Please dont mind.

No problem. The Ranch is a learning site. We're all here to learn about things -- even if it's just about other cultures.
 
Ravi kumark
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thank you!
 
Ravi kumark
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello bear,

Here is my code.I have 3 radio buttons.Whenever I clicked on one of them, remaining should hide or not visible.But I am not able to do that.
I am not understanding where I have done wrong.Please help me.



 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64971
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
First of all, forget the visibility property. All you need to do is to switch the display property between none and block. Refactor the code to do that and then we can look at it again.
 
Ravi kumark
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Bear ,

Sorry for the bad indentation.I have tried by doing those changes.But still I am not able to get what I wanted .


 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64971
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What have you done to debug the problem? Just looking at the code and scratching your head isn't going to help.

Have you even determined if the event handlers are firing? (Hint: they're likely not)
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64971
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We're also going to fix some other problems with the code.

  • Do you really think that 'R' is a good id for an element? 'F'?
  • bgcolor is deprectaed. Use CSS.
  • <center> is deprecated. Use CSS.
  • == true in an if conditional is redundant.
  • Non-quoted values are legal, but sloppy. Quote all attribute values.
  • Where's the DOCTYPE declaration?
  • Why the use of the <pre> tag?


  • That's enough for now.
     
    • Post Reply
    • Bookmark Topic Watch Topic
    • New Topic