Posts by Gabriel C. • 170 points
10 posts
-
2
votes1
answer164
viewsA: How to clone array
You can reduce the value of total in 1 every time an element is removed, moreover, create a array called original so that it can be cloned by array letters. So when the total reaches 0, you…
-
2
votes1
answer69
viewsQ: Regex to involve console.log expression in eclipse find/replace
I’m trying to involve everyone console.log(); of my code with the condicional if(showLog) { }. I was learning regex and found I could select all the expressions console.log() including those…
-
0
votes2
answers82
viewsQ: XHR in javascript for Python displays three times the return
I recently deployed Python to my IIS server, and started testing some requests. First I created the javascript code, as you can see below: sendRequest = function() { var http = new XMLHttpRequest();…
-
1
votes1
answer893
viewsQ: How to get javascript file content in string form?
I am making a program that needs to read the source code of a javascript file. I was trying to get the javascript file via Xmlhttprequest and return the this.responseText, however, its value is…
-
3
votes3
answers1163
viewsA: How to get the id of the onclick that was executed
You can use this.id as a parameter of the function enabled: <button id="goncalo" onclick="ativafuncao(this.id)">Goncalo</button> See the code working here I hope I’ve helped ;)…
javascriptanswered Gabriel C. 170 -
2
votes4
answers135
viewsA: Remove items an array containing only 1 character
Good afternoon. Just iterate the array and check each of the values by the strlen function, which returns the size of the string. If it returns 1, you can remove the element and swap it for an empty…
phpanswered Gabriel C. 170 -
0
votes1
answer240
viewsA: How to update an XML file without reloading the page
Cache-control cannot be used in requests, only in Sponses, you can create a php file that returns your xml file every time it is called. See the code below: $xmlfile = file_get_contents (…
-
0
votes1
answer240
viewsQ: How to update an XML file without reloading the page
Good afternoon, I am creating an application that loads functions based on the information of a given XML file. However, once I save a new function via php, when I go to do a Xhttprequest in…
-
1
votes1
answer164
viewsQ: Error in project Missing ) after argument list
Good afternoon, I am having a problem in my project and have not been able to find out what is causing the problem. Any help is appreciated. function logOnConsole(newLog) { currDate = new Date();…
-
1
votes1
answer13558
viewsQ: Project error: Uncaught Syntaxerror: Unexpected token var
I am making a console with javascript but I have had problems to discover the origin of the error. I have reviewed the code several times and could not find out what is wrong. Any help is…