Creating JavaScript Windows (Window Object) 3/3

Creating JavaScript Windows (Window Object) 3/3

Tiempo de lectura: 2 minutos Reading time: 2 minutes Hi, we continue with the JavaScript window object. In this tutorial, continuing from the previous Creating JavaScript Windows (Window Object) 2/3, what we want to demonstrate in the functionality is the following: <html> <head> <script> function openNewWindow(windowName) { // open a new window with the name passed as a parameter // … Read more

Creando Ventanas JavaScript (Objeto Window) 2/3

Creando Ventanas JavaScript (Objeto Window) 2/3

Tiempo de lectura: 2 minutos Reading time: 2 minutes Hi everyone, Continuing from the previous post Creating JavaScript Windows (Window Object) 1/3, in this case, the only thing we’re going to add is a button that performs the same function as the close button of the window itself, which is to close the current window. <html> <head> <script> function openNewWindow(windowName) … Read more

Make a GET Request from React Native

Make a GET Request from React Native

Tiempo de lectura: < 1 minuto Reading time: < 1 minute If we want to retrieve data from a remote server, we can use the following code: var myHeaders = new Headers(); myHeaders.append(“Content-Type”, “application/x-www-form-urlencoded”); var requestOptions = { method: ‘GET’, headers: myHeaders }; fetch(“https://www.miweb.com/getPerson”, requestOptions) .then(response => response.json()) .then((responseJson) => { alert(responseJson); }) .catch(error => console.log(error)); First, we create the headers … Read more

Send a POST of type FORM in React Native

Send a POST of type FORM in React Native

Tiempo de lectura: 2 minutos Reading time: 2 minutes In order to communicate with our remote server (backend) using React Native, we need to make an asynchronous call. //Headers, if we want to add a token, we have to include it in these headers. var myHeaders = new Headers(); myHeaders.append(“Content-Type”, “application/x-www-form-urlencoded”); javascript Copy code //Parameters to send var urlencoded = … Read more