Questions tagged as 'javascript'

1
answer

How do I make the code look at an if only after having changed the prop of an object?

I have a form that when I click on send it leaves red the field that is empty. It makes different validations in each of the fields. Only when all of the fields are greyed out does it send the data via post and disables the error message. Th...
asked by 29.01.2018 / 18:54
1
answer

Search for and display items of objects nested with JavaScript

I have two lists, the aggregation brings me the categories codes and the categories list brings all the categories that I have registered. I need to look up the categories in categories using the aggregation ids to create a new list only with th...
asked by 29.01.2018 / 17:42
2
answers

Return from select brings previous value - jQuery

I have a table #table and I would like every time I make a filter by select it adds the amount that is in column 6 eq (5) . With the code below it is running, however it displays the previous value that I select. For example, you are displayi...
asked by 30.01.2018 / 00:14
1
answer

How to relate two models with mongoose?

I have two models in my bd user.js var mongoose = require('mongoose'); var Schema = mongoose.Schema; var bcrypt = require('bcrypt'); // User Model var UserSchema = new Schema({ name: { type: String, unique: tru...
asked by 29.01.2018 / 19:14
1
answer

Effect with js and svg only works in the first class in the second effect does not apply

I have a problem with my effect on svg I added a triangles effect with svg and js on one of my sessions site as you can see works normally but I needed to put this effect again in another session I'm calling the effect via...
asked by 29.01.2018 / 17:54
1
answer

How to enable a button, only when you accept the terms

Well, I'm doing a virtual product shopping site, and I need my clients to accept the "Term of Use". The method I used was this <input name="ck_permissao" type="checkbox" id="ck_permissao" value="checkbox" onclick="return confere()" />&l...
asked by 30.01.2018 / 04:53
1
answer

Html Css and Php Dynamic content in DIV

I am developing a website and in it I created a service area where through CSS, HTML, PHP and Laravel I display the content dynamically, I make a foreach ... As I do not limit how many records the user can include, he can include as many as h...
asked by 21.02.2018 / 20:24
1
answer

Pass variables to the url through a Select Box

With this code in php, we pass variables to url manually. if (isset($_GET['layout'])) { $layout = $_GET['layout']; } else { $layout = '1'; } With this one, in javascript, authored @dvd we apply the variable passed in the URL in al...
asked by 21.02.2018 / 16:10
1
answer

Javascript - Quiz

I'm studying JavaScript, beginner level. So I am trying to mount a quiz according to a tutorial I found but encounter the following error when executing: ["SyntaxError: expected expression, got '<'", "filename": "https://stacksnippets....
asked by 14.03.2018 / 18:05
1
answer

window.confirm with custom buttons

How do I get the onclick to return a window with the 3 options: Yes No Cancel I need to know how to handle the selected option as well. The link will point to a PHP code that will handle the last ID , if t...
asked by 13.03.2018 / 19:25