-
Total de itens
638 -
Registro em
-
Última visita
Posts postados por Tenko
-
-
A intenção não era só saber se foi informado algum texto no campo?
Fiz isso só pra saber esta questão, desculpe se entendi errado
-
Boa tarde.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>teste</title>
<script>
function muda(oObj){
oObj.className = ( oObj.className == 'btSeguir' ) ? 'btNSeguir' : 'btSeguir' ;
oObj.innerHTML = ( oObj.className == 'btSeguir' ) ? 'Seguir' : 'Seguindo' ;
}
</script>
<style>
.btSeguir{
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 11px;
font-style: normal;
line-height: normal;
font-weight: bold;
font-variant: normal;
text-transform: capitalize;
color: #000000;
text-align: center;
vertical-align: middle;
height: 25px;
width:10%;
border: 1px dashed #000000;
cursor:pointer;
}
.btNSeguir{
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 11px;
font-style: normal;
line-height: normal;
font-weight: bold;
font-variant: normal;
text-transform: capitalize;
color: #0066CC;
text-align: center;
vertical-align: middle;
height: 25px;
width:10%;
border: 1px dashed #000000;
background-color: #DDF4FF;
cursor:pointer;
}
</style>
</head>
<body>
<button class="btSeguir" onClick="muda(this);">Seguir</button>
</body>
</html>
-
Boa tarde.
Vê se ajuda
function trim(sString){
var iTamaho = sString.length;
var sNovaString = '';
for (var i = 0; i < iTamaho; i++) {
if (sString.charAt(i) != ' ') {
sNovaString += sString.charAt(i);
}
}
return sNovaString;
}
if( trim(' ') == '' ) alert('Campo vazio');
-
Boa tarde
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>teste</title>
<script>
// O modo mais simples pra você entender
function mostra(){
var modo = document.getElementById('t1').style.display;
if( modo == 'none' ) {
document.getElementById('t1').style.display = 'block';
document.getElementById('acao').value = '-';
} else {
document.getElementById('t1').style.display = 'none';
document.getElementById('acao').value = '+';
}
}
</script>
</head>
<body>
<input type="button" value="+" id="acao" onClick="java script:mostra();">
<br/>
<br/>
<div id="t1" style="display:none; border:1px solid #000000; width:100%">
Esse é um teste
</div>
</body>
</html>
-
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>teste</title>
<script>
function get(){
alert( document.getElementById('t').value );
}
</script>
</head>
<body>
<input type="hidden" name="t" id="t" value="Campo oculto">
<input type="button" value="Pegar valor do campo oculto" onClick="java script:get();">
</body>
</html>
-
Boa tarde.
Tenta assim :
$teste = ( ! isset( $_POST['teste'] ) ) ? '' : $_POST['teste'] ;
-
-
Boa tarde.
tente alterar:
Isso
$lista = array($cli1, $cli2);
para isso
$this->lista = array ($cli1, $cli2 );
-
Boa noite.
Sei lá, achei muito superficial a descrição que eles colocaram para o curso.... se ele é bom?? Não sei, mas se você não sabe nada, esta realmente inciando é uma boa.
-
Boa tarde.
Vamos ver se eu entendi
<script>
function $( elemento ){
var t = document.getElementById( elemento );
alert( t );
}
</script>
<body>
$('<%=txb.ClientID%>');
</body>
-
-
Boa tarde
Na tabela tbl_funcionario supostamente você de ter o ID do funcionário, certo?
Então na sua tabela de ponto, seria +ou- isso
tbl_ponto
id_funcionario int,
Horário de chegada datetime,
Horário de saída para almoço datetime,
Horário de chegada do almoço datetime,
horário de saída datetime
Mas é melhor você dar uma olhada nesta estrutura.
Da pra melhorar
-
Boa tarde, beleza?
Existe um cd com a base dos correios, mas, como se trata de um cd antigo algumas ruas podem não existir.
Então, dê uma olhada neste endereço:
-
Já tentou usar com id?
<form method="post" action="" id="forms">
<input name="a" id='0' type="text" onclick = "funcao(this);"/>
<input name="a" id='1' type="text" onclick = "funcao(this);"/>
<input name="a" id='2' type="text" onclick = "funcao(this);"/>
</form>
<script>
function funcao(elements){
alert( elements.id )
}
</script>
-
Bom dia.
Para acesso a banco de dados você vai precisar de uma linguagem dinâmica (php, asp, jsp).
Sobre pesquisa e cadastro com javascript, busque no site sobre ajax
-
Bom dia.
Vê se seria isso:
<html> <head> <title></title> <script> function pegaElementos() { var oElementos = document.getElementsByTagName('input'); var iElementos = oElementos.length; var sBusca = 'imagem[]'; var sValores = ''; for( var i = 0; i < iElementos; i++ ) { if( oElementos[ i ].type == 'text' ) { if( oElementos[ i ].name == sBusca ) { sValores += ' ' + oElementos[ i ].value; } } } alert( sValores ) } </script> </head> <body> <input type="text" name="imagem[]" id="img" value="1"></br> <input type="text" name="imagem[]" id="img" value="2"></br> <input type="text" name="imagem[]" id="img" value="3"></br> <input type="text" name="imagem[]" id="img" value="4"></br> <input type="button" value="pegar elementos" onclick="pegaElementos()"> </body> </html>
-
<?php
require_once 'cone.php';
$conn = connect();
?>
-
Boa tarde.
O comando \n realmente faz a quebra de linhas, se você esta abrindo o arquivo pelo bloco de notas, tente ver aparece o caracter [], isso indica que tem um caracter especial ali.
Tente abrir o arquivo pelo Wordpad, assim ele diz se existe ou não a quebra
-
<?php
$sHtml = "<table width='120' border='0' bgcolor=''>";
$busca2 = mysql_query("SELECT * FROM produtos ORDER BY codigo desc LIMIT 8") or die ("Erro ao realizar a busca <br>" . mysql_error());
$a = 1;
//recebe os dados e insere no vetor reg
while ($reg2 = mysql_fetch_assoc($busca2))
{
//definindo a cor da tabela
if ($a % 2 == 0) {
$cor = "#F2F2F2";
} else {
$cor = "#FFFFFF";
}
$sHtml .= "<tr bgcolor='{$cor}'>
<td align='center' class='texto1'><span class='texto2'>{$reg2['descricao']}</span></td>
<td align=center' valign='middle'><img src='admin/imagens/produtos/{$reg2['imagem_mini]}' width='100' height='100'></td>
<td align='center' class='texto2'>{$reg2['preco_venda']}</td>
</tr>";
$a++;
}
$sHtml.= '</table>';
echo $sHtml;
?>
-
-
Que coisa feia de se pedir kkkk
:huh:
-
function concatenar() { var nome = document.getElementById('nome'); var endereco = document.getElementById('endereco'); var texto = document.getElementById('texto'); document.getElementById('pegardados').value = "##*##" + nome + "&" + endereco + "&" + texto + "**#**"; document.write.submit() } <input type="hidden" name="pegardados" id="pegardados" value="RESULTADO">
-
Como você esta chamando a funcão?
-
<html> <head> <title></title> <script> var d = document; function $( bloco ) { return d.getElementById( bloco ); } function validaprodutoadcionado(form) { if($('novo_preco').value == "" ) { alert("Preencha o campo Preço: campo obrigatório!!!"); $('novo_preco').focus(); return (false); } if($('imposto').value == "" ) { alert("Preencha o campo Imposto: campo obrigatório!!!"); $('imposto').focus(); return (false); } $( form ).submit(); } </script> </head> <body> <form id="teste"> <input type="text" name="novo_preco" id="novo_preco" value=""/> <br/> <input type="text" name="imposto" id="imposto" value=""/> <br/> <input type="button" value="Validar" onclick="validaprodutoadcionado('teste')";?> </form> </body> </html>
Duvida conexao com mysql
em PHP
Postado
Boa tarde, não crie uma conexão em cada página.
Crie um arquivo de conexão : conexao.php
<?php
$conexao = mysql_connect('localhost','$nome');
$sBase = mysql_select_db('banco',$conexao);
?>
E nas outras párinas você coloca no topo delas o include deste arquivo de conexão
<?php
include 'conexao.php';
?>