Questions tagged as 'javascript'

1
answer

target blank at URL

On my site I have a floating button that has an image and allows me to put a URL, however, you do not have the option to open in a new tab. You only have the space for the URL. I would like to know if you can do the target=_blank direc...
asked by 30.05.2018 / 04:44
1
answer

Call method in bean if condition is true

I created this confirm: <script type="text/javascript" language="javascript"> function salvarAntes(){ var r=confirm("Deseja confirmar?"); if(r){ return true; } e...
asked by 29.05.2018 / 17:29
0
answers

XMLHttpRequest No 'Access-Control-Allow-Origin' header is present on the requested resource [duplicate]

I am making multiple GET requests in an API and sometimes I get the message No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'null' is therefore not allowed access. The response had HTTP status code 429. a...
asked by 29.05.2018 / 17:15
0
answers

Reusing a jquery code for posts loads WordPress

I have a code, which loads wordpress posts via ajax. Works great on all templates. Index, tag, categories, etc. What I notice in this code is that apparently the loading is done through the divs, I do not know how to explain, just know that only...
asked by 29.05.2018 / 15:48
0
answers

Undefined is not a function (evaluating 'this.state.location.normalize (' NFD ')')

I get the error Undefined is not a function (evaluating 'this.state.location.normalize (' NFD ')') while I'am doing a statement as below: if(this.state.location.normalize('NFD').replace(/[\u0300-\u036f]/g, "").replace(/[^A-Z0-9]+/ig, "_").toLo...
asked by 29.05.2018 / 15:42
1
answer

Password verification with Java script [duplicate]

I have a password change code on my page. How do I do with javascript to compare if the new password entered in the two fields are equal? Here is my current code: <!-- Modal 4 --> <div class="modal fade" id="password" role=...
asked by 29.05.2018 / 00:33
1
answer

Limit jQuery checkbox

I'm creating a system where the bank's ready images and below each image has a checkbox, all this inside a for to get the images of the bank, wanted a function to be able to limit the amount of checkbox ie photos that the user can select, I'm us...
asked by 30.04.2015 / 15:45
1
answer

Increase in one field and Decrement in other JavaScript

I am in a project where several% of spinners when incrementing in one field it decreases in another. Example: In the 1st field I have the value 2. In the 2nd field I have the value 4. By clicking to decrease in the 1st field it will pass the...
asked by 29.05.2018 / 14:53
1
answer

Is it possible to separate the value of the JSON item?

Let's say I have an object like this: { "parametros": { "carteira": "RG", "taxaboleto": "0.00", "multa": "0.00", "juros": "0.00" } } Is it possible that I can extract the item's name from the object? For example, the...
asked by 05.06.2018 / 04:55
1
answer

Using specific values of a PHP JSON in JS?

This is my code, but for some reason it does not show the requested data .. I would like to see you if I am doing something wrong. PHP <?php $var1 = 1; $var2 = 2; $var3 = 3; $myobj -> foo1 = $var1; $myobj -> fo...
asked by 05.06.2018 / 01:21