Posts by Uriel • 119 points
15 posts
-
-1
votes1
answer23
viewsA: Update array specific positions using mongodb with or without Mongoose!
I got it using the save command() My logic is: Data comes from the front modified or not! I call my model by ID. const links = await meuModel.findOne({ _id }) links.links.forEach((v,i) =>{…
-
0
votes1
answer23
viewsQ: Update array specific positions using mongodb with or without Mongoose!
I have the following situation! const meuModel = new mongoose.Schema({ nome: { type: String, required: [true, 'Nome'] }, links:{type : Array,}, }) Links is an array of objects! links [{url:link,…
-
2
votes2
answers788
viewsQ: Know when you hear changes in DIV with Javascript
Hello, good morning. I need to compare a change in DIV1’s daughters to make a notification. This way I did may not be the best, I’m still learning. <div class="div1"> <div class="filha">…
-
1
votes2
answers1418
viewsA: Format Javascript date, find day of the week?
My answer to the problem. var str = campo.value, parts = str.split('-'), year = parseInt(parts[2], 10), month = parseInt(parts[1], 10) - 1, day = parseInt(parts[0], 10), date = new Date(year, month,…
javascriptanswered Uriel 119 -
2
votes2
answers1418
viewsQ: Format Javascript date, find day of the week?
I have the following problem. I have a date Picker that gives me the value of the date so : dd-mm-yya (13-05-2016) But I need to verify which day of the week is ex: Today is Friday. The problem I…
javascriptasked Uriel 119 -
-2
votes2
answers1172
viewsQ: Like taking a father’s son?
Next, I have a series of dynamically created Lis. What I need to do with pure JS is simply find the son of the father div. Here’s how it works: When a date has an unavailable time the system warns.…
javascriptasked Uriel 119 -
0
votes1
answer2377
viewsQ: Pick up child element of father and son created dynamically
I have the following question: I create dynamically various id and class. What I need is when I click on the parent id the child gets a toggle. Super dad receives via append as Divs. When I click…
-
0
votes3
answers451
viewsA: Role reuse on the same page with Jquery (beginner) Change event?
Answer given by a person on facebook. Dyemerson Almeida > in the Pastebin I found this answer tbm replaces str2= $(this). val(); For str2= $("#iddoselect"). val();…
-
1
votes3
answers451
viewsQ: Role reuse on the same page with Jquery (beginner) Change event?
What is the possibility of reusing $.change ? Guys, I have a problem. I need on the same page to use several changes in several selects. Here’s how it works: First change: User chooses in select 1…
-
1
votes1
answer379
viewsA: Select pressed with Jquery change?
Solved. I modified the code. $( "select" ).change(function () { var str = ""; $( "select option:selected" ).each(function() { str += $(this).val() + " "; }); console.log(str); cidade=str; var url =…
-
0
votes1
answer379
viewsQ: Select pressed with Jquery change?
I’m studying Json and the Jquery change event. What I need is this When the user opens the page already has results. (in select come marked all) html comes empty and only works when I change select…
-
1
votes5
answers32695
viewsA: Read and manipulate json data using jquery
Solved changed the way to call, to $.getJSON . $.getJSON( "http://meusite.com/", function( data ) { //console.log(data); console.log(data[0]['cidade']); console.log(data[1]['cidade']); }); This…
-
1
votes5
answers32695
viewsQ: Read and manipulate json data using jquery
They say that Json is simple. But I’m in a lot of pain. Following code: $(document).ready(function(){ $.get( "http://meusite.com/", function(data) { console.log(data); }); }); the result the…
-
0
votes1
answer152
viewsQ: Read XML inside Textarea with Jquery
Good afternoon. I have a normal HTML page and inside it I have a textearea with an XML of the same page. As you can see in the image below the XML is inside a textearea. I need to read and use his…
-
2
votes1
answer150
viewsQ: Show data from my site on other sites
I have a website where I want to make a widget (or something). I want to do more or less like some websites do: Give a JS + a div link to the user. It simply puts on the site and appear the data. My…