• 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

How to add a new Check box "Activate Selected items" on the page ?

 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi

I am working on a web application for store file maintenance. Need to add a new Check Box "Activate Selected Menu items" on the page.
Can you please help what code i should write to add a Check Box.

Thanks
 
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
Do you know HTML? You add a checkbox with the HTML input element of type checkbox.
 
Bartender
Posts: 1810
28
jQuery Netbeans IDE Eclipse IDE Firefox Browser MySQL Database Chrome Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You'll have to be more specific than that. TellTheDetails. Add a checkbox when? Based on some user event or just static HTML? Show us some code and explain what you've tried.
 
Jatin Guptaa
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am working on Java Project with jsp.
Can you please help what code i should in .jsp file to write to add a Check Box. Details are :-

In “Manage Price: <price info name>” screen i.e. price info details page, new checkbox "Activate Selected Menu Items" will be added. Positioning of this new field would be on the right of “Activate Menu Items” checkbox at the bottom of the page.

This new field “Activate Selected Menu Items" would be a checkbox and is grayed out on the initial page on-load.

The "Activate Selected Menu Items" checkbox is only enabled after the user performs the "Search" operation or "Add New Menu Item" operation in the price set.
 
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
That is all HTML and JavaScript -- doesn't sound like any JSP dynamic to it at all.

What part has you blocked?
 
Ranch Hand
Posts: 355
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello Jatin,
you can visit http://www.w3schools.com/html/html_forms.asp to see how you can create your checkbox
and you can read the attributes of the input tag here http://www.w3schools.com/tags/tag_input.asp
You can manipulate these as you like.
It could also help if you post the generated html from your jsp mentioning where you want changes to occur.
 
Bear Bibeault
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Be aware the w3schools is not well-recommended by experienced web developers. I'd visit the link in the previous sentence for better recommendations, including MDN.
 
Jatin Guptaa
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi
Need to add a new Check Box at bottom of page.
User selects above listed items and select checkbox value = true to activate all selected items.
One checkbox is already added (Activate All Items) . need to add another as Activate Selected Items.
Can you please help how to add another CheckBox

 
Rancher
Posts: 989
9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Adding new components using javascript/jquery is easy. You need to know where you are going to add them first and then the append function to add new html controls (in your case you will be adding input type="checkbox") elements. Give those new checkboxes a class as well. Selecting/deselecting then becomes easy. You just loop through the created elements setting checked=true e.g if you gave your input checkboxes a class called 'myClass' then the jquery code to select them would be


 
Paul Ngom
Ranch Hand
Posts: 355
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


Need to add a new Check Box at bottom of page.
User selects above listed items and select checkbox value = true to activate all selected items.
One checkbox is already added (Activate All Items) . need to add another as Activate Selected Items.
Can you please help how to add another CheckBox


I am confused. If you have already created a checkbox(Activate All Items), why can't you use the same syntax to create another. In the jsp code you have posted, you have not shown where you have created the first checkbox.
 
Jatin Guptaa
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Added successfully.
Thanks all for your suggestions.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic