Como eu faço pra chamar uma função em javascript se o numero de linhas for maior que 0,

Chamar Função
Started By victormangia, 01/12/2004, 12:51
2 replies to this topic
#1
Posted 01/12/2004, 12:51
PHP |
<?php $contagem = pg_num_rows($query); if ($contagem > 0) {echo "função aqui!!!!";} ?> |
#2
Posted 01/12/2004, 13:00
Resolvido,
PHP |
<script> function total(){ parent.order.valor_total.value = 'wwwwwww'; } </script> <? $contagem = pg_num_rows($query); if ($contagem > 0) { ?> <script> total() </script> <? } ?> |
#3
Posted 01/12/2004, 14:38
Ou vc pode usar o echo pra fazer isso....
<script>
function total(){
parent.order.valor_total.value = 'wwwwwww';
}
</script>
<?php
$contagem = pg_num_rows($query);
if ($contagem > 0) {
echo "<script>total()</script>";
?>
<script>
function total(){
parent.order.valor_total.value = 'wwwwwww';
}
</script>
<?php
$contagem = pg_num_rows($query);
if ($contagem > 0) {
echo "<script>total()</script>";
?>
if($ver_dados){
$nome = "Eduardo Oliva Barruzi";
$profissao = "Web Developer";
$idade = "19";
$publicar = true
}
if($publicar)
echo "$nome<br>$profissao<br>$idade";
1 user(s) are reading this topic
0 membro(s), 1 visitante(s) e 0 membros anônimo(s)