Dojo Toggle ComboButton - html

I have to change functionality of toggle button in web application built on JS Dojo api.
Currently it is dijit.form.ToggleButton, but it should have adittional option for dropdown menu with checkboxes. dijit.form.ComboButton looks like a viable option for that, but the problem is that it behaves like a regular button, and not like toggle button. What would be the best option to solve this problem?
One option I thought of was to manually change style of combobutton to make it look like it is checked, but I'm not really sure how to do that.
Any help would be appreciated.

Perhaps using a dijit/TooltipDialog with the ToggleButton onChange event?

Related

Is there a way to make HTML buttons act like radio buttons with React?

I have a group of <buttons> that I would like to act similarly to radio buttons. When a button is clicked, I need it to stay active, and when another button in that set is clicked, it needs to be made inactive and the new button needs to become active. I am using React.
I've tried different solutions and none have worked. Is there a way to do it with vanilla JS or React? Should I just use jQuery?
You can try some npm package that provides Radio Componenet to achieve this. You can search for packages and use the one you like. I am currently using Mantine which provides a lot of React components.
However, This is the one that I made. Take a look at it. Here is the link.
https://codesandbox.io/s/cold-water-ij5bfx?file=/src/App.js.

SAPUI5: WizardControl - Change Text on Button and add buttons

I am using the wizard control and i was trying to modify the text in the button for the next step also add some buttons inline with it. I have a screenshot here of what it currently by default looks like and what i wanted to achieve.
Current:
Target:
Can you guys please help me how to achieve this?
I asked a friend who did something like that. Ha just deactivated the button (using showNextButton="false") and made one himself.
Making a customized Button will solve your problem for sure.
Your custom buttons should have a controller function that changes the steps of the wizard. this.getView().byId("wizID").nextStep()

Hide and show menu after clicked on it

I have just started my study with css and html and I have first problem. I try to show my menu after clicked on it. When I clicked on it, menu item' s show up and immediately hide. How can I show it and hide after next click on my menu?
There is demo: jsfiddle.net/jekfej46/1/ Thanks a lot.
This is happening because :active is only a state. When you click an element, it changes the state to :active but only as you keep holding it. The best way to do it would be using jQuery to add a class to the menu when you click that button.
If you don't know how to use jQuery, there are lots of tutorials all over the internet that can easily guide you through. It's pretty easy once you get the principles.
Here's a working fiddle: http://jsfiddle.net/jekfej46/1/
In this case, JavaScript checks if the element already has the active class. If it does, the class is removed so the menu closes. But you can change that behaviour if you want.
You can't do the click event only with CSS. You need JavaScript here. Something like this will do this for you using jQuery.
$('#category').on('click', function(){
$('.dropdown-content').show();
});
Ohh, a lot guys. Now, I know that I also need js and jQ to improve my pages. Thanks.

How to show date selection Menu In HTML?

am working on a webPage where i have to accept a date. Have put an image button and onClick of that button i need to show a date selection menu. Can anyone plz tell whether it is possible or not? If possible HOW???
Have a look at the JQuery UI Datepicker. Choose the link on the right "Icon trigger".

Change the styling of default alert box

Could someone please tell me how can I change the default css of a alert/prompt box ?
You can't. They are native to the browser and are not styl-able.
You should turn to javascript alert-like systems. Using jQuery, here are some:
jAlert
jQuery UI dialog (with some tweaking)
This page proposes three alternatives to native alert/confirm/prompt
This answer shows a way to have a confirm-like blocking dialog using jquery ui dialog
The alert box is built into the Browser. You will need to popup your own dialog. The jQueryUI is very good for this.
For an example on this, look on the jQuery UI site.
As noted above you may always use the jQuery Alert box...
But you may also fire a JavaScript/jQuery Function in which displays a DIV (HTML Element), in which you may style completely.
The alert box that is used by javaScript is part of the browser. (other poeple have pointed this out but if you would like to have a good starting point try this.
http://jqueryui.com/demos/dialog/#default
jQuery Ui has some great tools for creating your own alert box and will also having other helpful options.
Just wanted to give some more information.