Posts by lvr7 • 337 points
16 posts
-
-2
votes1
answer34
viewsA: How to add only 1 time the same item in the cart ? (Javascript)
If checking is the car to be added, would do the following: funcBtnAdd = (event) => { const check = this.state.car.filter(item => item.id == event.id); event.btnDisabled = true; const…
-
1
votes2
answers78
viewsA: Limit text to be selected from input with Javascript
Here I am using the substring function that will return all the content in the string that exists before the character "(", that is, from position 0 to where there is the character I want to limit.…
javascriptanswered lvr7 337 -
0
votes2
answers2339
viewsA: Syntaxerror: JSON.parse: Unexpected Character at line 1 column 1 of the JSON data
you don’t need keys to access the object. Thus: $obj->glbId;
-
0
votes3
answers349
viewsA: What are the advantages of using PHP’s sprintf function?
In my view, when you need to insert many variables in a string, query, among others, it makes it much easier, because when concatenating we would have to open and close single and double quotes and…
-
3
votes5
answers9207
viewsA: Change the color of the text by clicking a button
You must put an id on H1: <h1 id="texto> texto </h1> Add an onclick to the button <input id="botao" type="button" onclick="trocarCor()"value="Mudar de cor "/> And in javascript:…
-
2
votes1
answer58
viewsA: How to effect text as soon as the user scrolls the page
You can easily do this using the wow.js and Animate.css libraries
-
0
votes1
answer27
viewsA: CSS problem, page size
Friend, I suggest you study some of the property display and position of css, fix all the elements so it is not the correct form. I redid your code using flexbox, hope I can help you. body {…
-
1
votes1
answer54
viewsA: Error with search bar results
Create an Event Listener in input. The Event Listener "listens" for changes, and triggers a function. Would look like this Var inputBusca = Document.getElementById('busca'); Var lista =…
-
0
votes2
answers375
viewsA: Open javascript in handlebars
Since handlebars is a script, it will not recognize the other script within it. What you can do is: "escape" the script tag. Would look like this: <script…
-
3
votes1
answer99
viewsA: Dynamic input returns Undefined
The error is in the concatenation. You put .input. The right thing is +input: alert('neste momento coloca a chamada AJAX ' + input)…
-
1
votes2
answers437
viewsA: Div is bigger than Section
I recreated your page with the bootstrap, I hope I can help you. I suggest you look a little more about the classes of flexbox, will better organize your code. html,body{ height: 100% !important; }…
-
2
votes1
answer97
viewsA: How to send 2 GET with input
Put the ref=app in the attribute action of the form: For example: action="pagina.php?ref=app" Or you can also put this value in a input hidden, thus: <input type="hidden" name="ref" value="app"…
-
0
votes3
answers28
viewsA: I can’t leave the ROW imgs with flexbox
Put display:flex on parent div, in case #containerimgs. Would look like this: #containerimgs { display:flex; flex-direction: row; }
-
0
votes1
answer37
viewsA: Doubt - media screen
try to add: @media screen and (min-width: 1024px) and (max-width: 1099.98px) {}
-
0
votes2
answers186
viewsA: Make variable wait to be set by user after While? java
I don’t quite understand your question. But come on: Start the variable with the value 0, to prevent excerpts where it will not be used. int num = 0; do { System.out.println("Escreva um numero menor…
-
2
votes2
answers110
viewsA: How to prevent function modifies global variable?
The C parameter was receiving array A, and was overwriting it. var a = ["oi","tchau"]; function duplicar(c){ var x = Array(); x[0] = c[0]+c[0]; x[1] = c[1]+c[1]; return x; } I hope I’ve helped…