<script> parent.location = "index.html"; </script>
coloca esse código na página que exibe a confirmação de voto, a página que aparece depois que o usuário dá ENTER.
There have been 11 items by Henderson (Search limited from 27/04/2023)
Posted by Henderson on 15/08/2011, 15:53 in Javascript / DOM / AJAX / ECMAScript
<script> parent.location = "index.html"; </script>
Posted by Henderson on 15/08/2011, 15:48 in Javascript / DOM / AJAX / ECMAScript
/* Busca do primeiro para o segundo select */ function list_dados( valor ) { http.open("GET", "categorias_busca.php?id=" + valor, true); http.onreadystatechange = handleHttpResponse1; http.send(null); } function handleHttpResponse1() { campo_select = document.forms[0].subcategoria; if (http.readyState == 4) { campo_select.options.length = 0; results = http.responseText.split(","); for( i = 0; i < results.length; i++ ) { string = results[i].split( "|" ); campo_select.options[i] = new Option( string[0], string[1] ); } } } function handleHttpResponse2() { campo_select2 = document.forms[0].categoriafinal; if (http.readyState == 4) { campo_select2.options.length = 0; results2 = http.responseText.split(","); for( i = 0; i < results2.length; i++ ) { string2 = results2[i].split( "|" ); campo_select2.options[i] = new Option( string2[0], string2[1] ); } } } function getHTTPObject() { var req; try { if (window.XMLHttpRequest) { req = new XMLHttpRequest(); if (req.readyState == null) { req.readyState = 1; req.addEventListener("load", function () { req.readyState = 4; if (typeof req.onreadystatechange == "function") req.onreadystatechange(); }, false); } return req; } if (window.ActiveXObject) { var prefixes = ["MSXML2", "Microsoft", "MSXML", "MSXML3"]; for (var i = 0; i < prefixes.length; i++) { try { req = new ActiveXObject(prefixes[i] + ".XmlHttp"); return req; } catch (ex) {}; } } } catch (ex) {} alert("XmlHttp Objects not supported by client browser"); } var http = getHTTPObject(); // Logo após fazer a verificação, é chamada a função e passada // o valor à variável global http. /* Busca do segundo para o terceiro select */ function list_dados2( valor ) { http.open("GET", "categorias_busca_sub.php?id=" + valor, true); http.onreadystatechange = handleHttpResponse2; http.send(null); }
Posted by Henderson on 15/08/2011, 15:36 in Javascript / DOM / AJAX / ECMAScript
Posted by Henderson on 15/08/2011, 15:33 in PHP
<form action="carrinho.php?cod=".$cod."&acao=incluir'"> <label for="codBar">Passe o leitor pelo código de barras <input type="text" id="codBar" name="cod" /> </label> <button type="submit">OK </button> </form>por isso
<form action="carrinho.php" method="get"> <label for="codBar">Passe o leitor pelo código de barras <input type="text" id="codBar" name="cod" /> </label> <input type="hidden" id="acaoHidden" name="acaoHidden" value="incluir" /> <button type="submit">OK </button> </form>
Posted by Henderson on 15/08/2011, 15:06 in Javascript / DOM / AJAX / ECMAScript
HTMLTextAreaElement.prototype.wordSelect = function() { if(this.selectionstart !== this.selectionend){ this.focus(); return; //sai da função e não retorna nada } var startCursor = this.selectionStart; var endCursor = this.selectionEnd; var txt = this.value; alert(startCursor); alert(endCursor); alert(txt); while (startCursor-1 >= 0 && txt.charAt(startCursor-1) != ' ' && txt.charAt(startCursor-1) != '\n' && !txt.charAt(startCursor-1).isPoint()) { startCursor--; } while (endCursor < txt.length && txt.charAt(endCursor) != ' ' && txt.charAt(endCursor) != '\n' && !txt.charAt(endCursor).isPoint()) endCursor++; //alert(startCursor); this.selectionstart = startCursor; this.selectionend = endCursor; this.focus(); alert(startCursor); alert(endCursor); alert(txt); };
Posted by Henderson on 15/08/2011, 14:41 in Javascript / DOM / AJAX / ECMAScript
while (startCursor-1 >= 0 && txt.charAt(startCursor-1) != ' ' && txt.charAt(startCursor-1) != '\n' && !txt.charAt(startCursor-1).isPoint()) { startCursor--; }
Posted by Henderson on 15/08/2011, 13:37 in Javascript / DOM / AJAX / ECMAScript
Posted by Henderson on 15/08/2011, 11:49 in Javascript / DOM / AJAX / ECMAScript
Posted by Henderson on 15/08/2011, 11:35 in PHP
Posted by Henderson on 15/08/2011, 10:25 in HTML, CSS e Metodologias
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title></title> <style type="text/css"> html, body { padding: 0; margin: 0; height: 100%; width: 100%; } .class-you { color:#3895BF; font-weight:bold; } .class-partner { color:#2E900D; font-weight:bold; } #container { width: 100%; height: 100%; } #content { width: 100%; height: 100%; } #topbar { padding-top: 10px; height: 50px; width: 100%; } #buttons { padding-bottom:5px; width:170px; float:left; } .buttonFont { font-size:10px; } #info { font-family:Verdana, Geneva, sans-serif; font-size:12px; float:left; padding-top:5px; } .label { font-family:Verdana, Geneva, sans-serif; font-size:11px; color:#3895BF; } #externalPanel { clear:both; margin: 0 5px 0 5px; height:70%; width:99%; } #panel { overflow:auto; padding:3px; font-family:Verdana, Geneva, sans-serif; font-size:12px; height: 100%; width: 100%; } #typing { padding-top: 5px; margin-left: 4px; width: 95%; height: 25px; clear: both; } #sendMessage { padding-top:5px; margin-left:0px; width: 100%; height: 62px; } #message { float: left; width: 89%; height: 60px; } #submit { float: right; font-size:13px; width: 10%; height: 62px; } #ads { clear: both; margin-top: 10px; height: 90px; width: 100%; } </style> </head> <body> <div id="container"> <div id="content"> <div id="topbar"> <div id="buttons" class="buttonFont"> <input type="button" id="logout" name="logout" value="close" /> <input type="button" id="status" name="status" value="searching..." /> </div> <div id="info"> you are a ... </div> </div> <div id="externalPanel" class="ui-corner-all ui-widget-content"> <div id="panel"> </div> </div> <div id="typing"></div> <div id="sendMessage"> <div id="messageBox"> <textarea id="message" name="message" class="ui-corner-all ui-widget-content"></textarea> </div> <div id="submitBox"> <input type="button" id="submit" value="send" /> </div> </div> <div id="ads"> </div> </div> </div> </body> </html>
Community Forum Software by IP.Board
Licensed to: Webmasters Online