Questions tagged as 'jquery'

1
answer

Generate next sequence of an "index"

I have a problem generating a string for an "index". As an example, if I get the number 1.2, I wanted to generate the number 1.2.4 as a string or if I get 1.2.2 I wanted to generate 1.2.2.1 <select> <option>1.1 </opti...
asked by 15.05.2018 / 19:22
2
answers

Validate fields with jQuery

I have a function in jQuery , which when the user clicks the next button it triggers an email. When I click the button, I need to verify that the Name , Email and Phone fields have been filled out and, if not completed, low input...
asked by 16.05.2018 / 18:33
2
answers

How to execute a function whose name was passed as parameter of another function, à the callback?

I created this function in order to abstract the $.ajax() calls to be executed at several different times. One of its parameters is the name of one of the functions that I would like it to run on success. However, how should I call thi...
asked by 10.05.2018 / 05:34
1
answer

Clear select element with JavaScript

I have this field select: <div class="control-group"> <select runat="server" onclick="ClearOptions(this);" name="txtpesquisa" id="txtpesquisa" class="form-control.selectize-control"> </select> <script>...
asked by 08.05.2018 / 22:45
1
answer

How do I split items and different sub-pages on the same page?

I wanted to split a few different items into subpages , an image of an example. For example, if I click the button 1 it shows the element 1 , if I click the button 2 it shows the > element 2 , but all this without page change ,...
asked by 09.05.2018 / 21:13
1
answer

Print list of data json

I need to get the data from a json file and with that data generate a list corresponding to the category that it belongs to for example if it is the technology category I need to generate a list of all the items that are of that category, if it...
asked by 23.10.2018 / 03:16
3
answers

Request ajax - Query parameter

In a page I have this field filled with the value "SP" <input id="campo" value="SP"> In php I have parameter <?php echo $_POST['estado']; ?> To process this field via ajax I would use var valor=$('#campo').val(); in th...
asked by 12.11.2018 / 16:22
1
answer

How to create a JSON file from a JS?

Hello, I created a simple page where the user can set some fields. I need to implement the following function: When you click the Create button, the application should generate a JSON file with all the fields that were created. As I know almost...
asked by 10.11.2018 / 12:50
1
answer

change attribute value with jQuery

I have the following js : $("a.bloqDesbloq").click(function() { $.post ("../_requeridos/alteraAdministrador.php", { idAdministrador : $(this).attr('idAdmin'), bloq : $(this).attr('bloq')...
asked by 22.05.2018 / 18:26
1
answer

StopPropagation with right click / right click

With this code I can stop the propagation of a dropdown menu by clicking on the document. It Works very well. Now I'd like to accomplish the same thing, but with the right click. The magic happens thanks to event.stopPropagation(); wit...
asked by 20.05.2018 / 01:30