• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

create dynamic select boxes based on value using jquery

 
Ranch Hand
Posts: 299
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Suppose i have 3 select boxes, on my JSP. Lets call them selectbox1, selectbox2,selectbox3.
Now I select some relevant value for "Selectbox1", then "selectbox2" appears.
Now i select some relevant value for "selectbox2", then "selectbox3" appears.

Now, i remove the value from "selectBox2", then selectbox3 should disappear.

I want to get it done through jquery.Is it possible?

 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Maan Suraj wrote:I want to get it done through jquery.Is it possible?


Yes.
 
Ranch Hand
Posts: 124
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
you can either read jquery document in its official website or read Bear's jquery in action from which I learned a lot.
 
Bear Bibeault
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You can download sample code from http://manning.com/bibeault2. See the samples for chapter 8.

[P.S. Thanks for the praise, Hongli Li!]
 
Hongli Li
Ranch Hand
Posts: 124
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Bear Bibeault wrote:
[P.S. Thanks for the praise, Hongli Li!]



you are welcome Bear, after reading your book I became a serious javascripter in a week I didn't just learn the jquery part and also learned CSS with the inspiration of your sample code. I don't need to use any cumbersome web framework's javascript supports or plugins to do my daily work like ajax, developing widgets..etc. I've also learned closures and later I applied this powerful technique to actionscript and grails. It's like killing 3 birds with 1 stone. I can't wait for your second edition. You definitely deserve more than what I can say.
 
Maan Suraj
Ranch Hand
Posts: 299
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks guys....

Now after all this praise, iam excited ti buy this book as well,

Thanks again
 
The airline is called "Virgin"? Don't you want a plane to go all the way? This tiny ad will go all the way:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic