Questions tagged as 'javascript'

2
answers

How to execute a code only after finishing another?

I need to run the city search only after finishing loading the states within the select and capturing the ID . I'm getting this ID to send another Ajax that will populate the cities of this state within another select. What is ha...
asked by 20.10.2016 / 15:56
3
answers

Assign value received from $ .ajax to the variable

It is possible to associate a value received with $.ajax with a global variable, because from these values, I need to add them and show them in another table. I have tried it however it always interprets with local variable, losing its va...
asked by 24.05.2016 / 04:18
2
answers

Checking for equality between objects

Well, I need to check the contents of 2 objects, I need to know if they are the same or not in the main fields. My idea is to check when inserting some data in the localStorage if that data already exists, if there is I should replace the exi...
asked by 18.05.2016 / 13:48
2
answers

How to convert a file in javascript format to ts format?

I know that the TypeScript language is used to compile files in JavaScript. But I wonder if there is any tool that makes it possible to do the reverse. Is there any way to convert a JavaScript file to a TypeScript structure, something automat...
asked by 14.10.2016 / 16:05
2
answers

Do not run event in just one page

I have the following code on every page $( ":submit" ).click(function() { $("#escondido").css("display","block"); }); This code is in a blabla.js file, and is included with php at the top of every page of the site, but in j...
asked by 13.10.2016 / 19:59
2
answers

Auto select option from a select from an input

I have a form, where it collects data from the Post Office through the zip code. I have the following imput: <input type="text" name="estado" id="estado" /> If the person has filled out an SP from São Paulo, this input above is given...
asked by 28.04.2016 / 18:20
2
answers

Insert multiple values into component

Well guys, I'm facing the following problem: I have to set several values in one that is using the plugin below. To set only one value I am using the following syntax $("#s").select2('val',1); Now how can I do to enter more than one v...
asked by 25.04.2016 / 16:39
2
answers

JavaScript OnUnload Function

I'm using the OnUnload function of javascript, but I can not find error. The alert should be displayed before closing the browser, window, or loading another address bar, correct? function close(){ alert("Não vá embora, inscrev...
asked by 05.05.2016 / 18:21
1
answer

WebSerivce only accepts requests from local server [closed]

I have a Webservice in PHP and I need to use it to integrate two applications. WS returns in JSON the data I need. The problem is that it returns only the data when the request is made from a local server. If I do the request from any web do...
asked by 09.05.2016 / 20:45
1
answer

Realizing two queries in SalesForce generates Undefined values

I'm running two queries in SalesForce. However, when I try to use the values received outside the scope of the query, they are undefined. Here is the code: var conn = new jsforce.Connection(); conn.login('email', 'password', function(err, res)...
asked by 10.05.2016 / 18:58