Posts by Misael Braga • 122 points
9 posts
-
2
votes1
answer35
viewsA: How to mount on the received data page via get
Create elements in your document and set the textContent for them. <!-- Dentro do body --> <script> (function() { var listEl = document.createElement('ul'); var idEl =…
javascriptanswered Misael Braga 122 -
1
votes9
answers30430
viewsA: How to debug code in PHP?
A strategy that works in almost every environment is writing a log file: <?php $test = 'My variable value'; file_put_contents('./my-log.txt', 'test='.$test);
-
1
votes4
answers2032
viewsA: Validation of forms with javascript
It is possible to perform such validation with HTML5. <input type="checkbox" id="model_confirmar" name="model[confirmar]" required />
javascriptanswered Misael Braga 122 -
1
votes2
answers262
viewsA: How to use fadein() in addClass()?
It is possible to perform such effect using css3 Transition. Ex: CSS: div { transition: 1.3s; opacity: 1; } .hide{ opacity: 0; } Your javascript would look like this: $(".hide").removeClass("hide");…
-
1
votes2
answers772
viewsA: Error executing Cordova build command
To build on the android platform you need to install JDK, Apache Ant and Android SDK. You also need to configure the following environment variables in the OS: JAVA_HOME, ANDROID_HOME and ANT_HOME.…
-
0
votes9
answers30430
viewsA: How to debug code in PHP?
If you want to know the value of a variable, you can only use: die(var_dump($variavel));
-
3
votes3
answers24198
viewsA: Wait for Ajax return in synchronous function
Have you tried using callbacks? function foo (callback) { $.ajax({ url: "/minha_api", myCallback: callback, success: function(){ this.myCallback(true); } }); } foo(function(a){ alert(a); });…
-
0
votes2
answers634
viewsA: ajax duplicating div
Instead of using the appendTo method, try using the . html() method Example: $("#exibeCep").html('<label><input type="radio" name="zipcode" id='+'sedex'+' value='+'CEP + 'de destino…
-
0
votes3
answers7402
viewsA: Load refresh-free page post with AJAX and JQUERY
An alternative: $("a").click(function(e){ $('#content').load(this.href); e.stopPropagation(); e.preventDefault(); });