Posts by Claudio Caetano • 7 points
5 posts
-
0
votes3
answers4103
viewsA: Put a url inside select option
To put the link within a single option do as follows: <script type="text/javascript"> function changeFunc($i) { if ($i == 'nova'){ window.open('index.php?pg=cadastrar_categoria','_self'); } }…
-
-2
votes3
answers444
viewsA: How to deal with errors in case of a failure in simplexml_load_file in PHP?
if (simplexml_load_file($url)) { $xml = simplexml_load_file($url) return $xml->cServico; } else { echo 'SUA MENSAGEM'; }
-
0
votes1
answer191
viewsA: Collapsed menu after selection
You must put a real destination to the links. When placing href="#" you do not leave the page and the menu does not collect.
-
0
votes3
answers3696
viewsA: Webservice de CNPJ
The secret here is the getJSON does not catch straight from the recipe: $.getJSON("http://receitaws.com.br/v1/cnpj/"+ cnpj, function(dados) but create a file that creates a JSON and then yes take…
-
1
votes8
answers48548
viewsA: How to pass parameters in function calls by reference in Javascript?
You can pass several parameters via javascript using this example: function abreJanela(URL,URL2) { location.href = "#?pg=pecas&nome="+URL+"&ano_base="+URL2; //este metoo manda parametros via…