Pop up doesn't close even after clicking save button - javascript

I have an issue with my code:
If i do not select any value in my drop down button, it will show a pop up with the message "please select value". After selecting a value, the pop up will not close and even after saving the data it is still showing.
Give me some suggestions to close the pop up while selecting the right value in my drop down.
Here my code
error_notify('Please Select City', 'error');
$('#orgCity').addClass('errorcolor');

You need to create a close pop up function in which you can hide pop up by their id or class name and trigger them with your selection from drop down.

Related

Unselect the select box once isClearable is clicked or true

I wanted to unselect the Input box once the close button is selected after the option is selected
I have attached codesandbox link
Current output
When user select the option value is displayed when close icon is clicked it removes the option but select box is selected unless you click outside, it un-selects the box
expected output
When user select the option value is displayed when close icon is clicked it removes the option and un-selects the box as well.
You are talking about something named 'focus'.
This is actually built-in browser behavior, so if you want it to lose focus in some cases you can do it programmatically using refs.
Here is a link to guide where you can find how to do it

Get selected values from message menu or drop-down on click of a button in a slack interactive message or attachment

I have a slack message with two actions:
Message Menu, i.e. dropdown
Button
I would like to:
Select a value from the message menu or drop-down.
Click the button.
On clicking this button, I would like to get the value of the selected value from the drop-down
Please let me know if it is possible.

Can't click or select an item from javascript dropdown menu using VBA

As the title suggests, I've found the ClassName of the button I want to click (I think, because the innertext on that ClassName array # gives me the correct text shown on button). Problem is, I'm clicking it but it does nothing.
This is my best attempt, among dozens, but it's not doing anything.
For Each i In IE.document.getElementById("typeSelector")
If i.innerText = "Revenue" Then
i.Click
i.FireEvent ("onchange")
'This click and fireEvent are activated but do nothing.
End If
Next i
'These next ones are Hail Mary's stacked on top of each other to see if I get a reaction out of that damn box. Nada.
Debug.Print IE.document.getElementsByClassName("chzn-single chzn-default")(0).innerText 'Prints "Select an option". I thought clicking this would at least open the drop down menu but still, nothing.
Debug.Print IE.document.getElementById("typeSelector_chzn_o_14").innerText 'Prints "Revenue". This is the option within the dropdown menu, shown after clicking the menu when manually done.
IE.document.getElementsByClassName("chzn-single chzn-default")(0).Click
IE.document.getElementById("typeSelector_chzn_o_14").Click
To summarize, I've tried activating the option based on index, clicking the box, clicking the box then clicking the "Revenue" option. The website remains completely unmoved. Should be noted that a succesful click would not update the website, simply highlight the "Revenue" option in the menu, and open up a Date input box.

How to remove the cancel and ok buttons in dropdown using ionic2?

I am new to the ionic.At first i had created the dropdown,Inside the dropdown there is some value,when the user clicks some value in the dropdown it will automatically display cancel and ok button but i should not want to display the cancel button,instead of that if user selects some value in the dropdown,it should go to same page.
Below is the screenshot i had got:

JavaScript - How to save a selected option

I've got a question about how to save a selected options in a select box.
I created a select box with few options, a "save and show" button, and a reset button.
But I don't know how to save the selected items whenever I'm jumping to the page (unless I select the reset button to change my option) .
Thanks for answering my questions.

Categories