Questions tagged as 'option'

1
answer

Redirect through the option value and keep it selected

I need to redirect according to the value of the "option" and keep this "option" selected after the redirect. I can already redirect through this code: $(function() { // bind change event to select $('#categoria').on('change', function() {...
asked by 26.01.2018 / 00:40
1
answer

How to select the value option returned with jQuery?

This variable data.uf returns me the acronym of the states. Ex ...: SC How do I loop with jQuery to select the data-acronym corresponding to the variable data.uf ? <select id="billing:region_id" name="billing[region_id]"> &...
asked by 12.04.2016 / 17:36
1
answer

Generate options from a select (years) according to another selected field

I have a form to register dependents of a plan, where you can choose child, husband, father-in-law, etc. and then the year of birth I want you to select the type of relationship by changing the select options, eg Selecionar filho: Máximo an...
asked by 11.12.2017 / 13:10
2
answers

Events with the tag selectoption

I'm trying to make a page with html + javascript, but I do not know anything about php ... Anyway, my doubt is this! I have created a checkbox, and when the user selects that option, I want to change a text ... But I can not identify which optio...
asked by 05.11.2016 / 17:49
3
answers

option selected

I have a code that returns bank data in an option, but I can not get the value registered in the bank to be selected. For example, the option will bring all neighborhoods registered in the neighborhoods table. In this Option would like to, in ad...
asked by 03.12.2018 / 14:51
1
answer

Returning select value with javascript / jquery

I'm developing a software and I need to know which option the user selected and returned in the console.log, but I tried several functions and none worked. How do I get this return? function verificar() { // aqui seria a fu...
asked by 18.12.2017 / 18:33
2
answers

How do I mark options in ajax return?

I have an array of ids and I'm returning this array in the ajax response. How to compare this array with the select options and mark the option if it matches the index of the array? In PHP, we use the in_array () var options = data.opti...
asked by 30.11.2017 / 18:32
1
answer

Open javascript with Select Option

I want to open openVit () and openVilla () when the select option is pressed. <select> <option href='javascript:;' onchange="abrirVit();" value="canto">Vitória - Praia do Canto</option> <option href='javascript:;' onchange...
asked by 19.09.2016 / 22:26
1
answer

Change the HTML attribute in the option with JQUERY

I'm trying to change the value of the select field with option to disabled, but only when the user clicks the input field. See the image to understand better: Iwanttoexactlyleavethefirst"option" disabled only when the user clicks the fie...
asked by 10.05.2018 / 15:23
2
answers

How to make multiple values in a single option and retrieve them

I want to know how can I make a list with a specific tab "|" and set more than one value in select-option and retrieve in JavaScript with a split("|") to a variable, something like: <select id="teste"> <option value...
asked by 27.01.2017 / 09:00