PHP, Java, JavaScript, XML, XHTML, HTML, CSS, ASP, Delphi, Assembly, LaTeX, C, UML, Flash, Perl, SQL, Python, Zope, Pascal, WML. Se conhece mais de 3 siglas referidas, este é o forum para si.
Moderadores: Administradores, Moderadores
por kugasthelast » Quinta Dez 06, 2007 16:13
Ora boas novamente...
Gostaria de enviar um valor para a propria pagina, a caixa é do tipo RADIO e o que tenho é o seguinte:
- Código: Seleccionar todos
<td id="headerT"><input name="farma" value="indexdemo.php?farma=<?=$row1['idfarmacia']?>" type="radio"></td>
nao sei o k posso fazer para que possa enviar o valor <?=$row1['idfarmacia']?> para a mesma pagina...
ajuda??
OBRIGADO
-
kugasthelast
- Aprendiz

-
- Mensagens: 71
- Registado: Quinta Jul 19, 2007 14:31
por forbid » Quinta Dez 06, 2007 16:32
Podes-te explicar melhor?

Me... God... What's the difference?!
ASUS M3N78-VM
3x1GB DDR2 800 TwinMos
AMD Athlon 7750 Dual-Core 2.70 GHz
NVidia XFX GeForce 8600GT
Sound Blaster Audigy 2 with Creative Inspire 5.1 P580
Disco SATAII Maxtor 250 GB
Disco SATAII Samsung 300GB
-
forbid
- Membro de Prata

-
- Mensagens: 203
- Registado: Domingo Out 03, 2004 16:25
por kugasthelast » Quinta Dez 06, 2007 17:04
bom se calhar é melhor por uma parte do codigo...
- Código: Seleccionar todos
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<form name="for" method="post">
<tr>
<td bgcolor="#CCCCCC"><div align="right">Cód. Farmacia:</div></td>
<td bgcolor="#CCCCCC"><input name="codf" type="text" size="10" value="<?=$_GET['farma']?>"></td>
<td rowspan="2"><input type="submit" name="Submit" value="Começar"></td>
</tr>
<tr>
<td bgcolor="#999999"><div align="right">Password:</div></td>
<td bgcolor="#999999"><input name="pw" type="password" id="pw" size="10">
</td>
</tr>
</table>
.....
<table width="50%" border="0" cellspacing="1" cellpadding="1" align="center" >
<tr bgcolor="#000000">
<td width="37%" bgcolor="#000000" class="style3" id="bodyT">Código</td>
<td width="42%" bgcolor="#000000" class="style3" id="bodyT">Farmácia</td>
<td width="42%" bgcolor="#000000" class="style3" id="bodyT">Localidade</td>
<td width="21%" bgcolor="#000000" class="style3" id="bodyT">Escolher</td>
</tr>
<tr>
<?PHP
if ($_GET['partnome']);
{
$sel1="SELECT nome,idfarmacia,id,distrito FROM tbl_Farmacia ORDER BY idfarmacia ASC";
$stmt1=mysql_query($sel1, $conDb);
#echo $sel1;
while($row1=mysql_fetch_array($stmt1))
{
?>
<td id="headerT"><?=$row1['idfarmacia']?> </td>
<td id="headerT"><?=$row1['nome']?> </td>
<td id="headerT"><?=$row1['distrito']?> </td>
<td id="headerT"><input name="farma" value="indexdemo.php?farma=<?=$row1['idfarmacia']?>" type="radio"></td>
</tr>
<?PHP
}}
?>
</table></form>
ou seja quando selecionarem a farmacia com o botao tipo RADIO gostaria que automaticamente transportasse o valor idfarmacia para a caixa de texto Cód. Farmácia na parte do login (<input name="codf" type="text" size="10" value="<?=$_GET['farma']?>">)
nao sei se me fiz entender assim....

-
kugasthelast
- Aprendiz

-
- Mensagens: 71
- Registado: Quinta Jul 19, 2007 14:31
por kugasthelast » Segunda Dez 10, 2007 16:42
consegui fazer mas com imagem....eis o codigo...
- Código: Seleccionar todos
<td id="headerT"><a href="http://www.teste.pt/teste/test/indexdemo.php?farma=<?=$row1['idfarmacia']?>"<?=$_POST['farma']==1?>><img src="images/setav2.png" border="0"></a></td>
e o que queria mesmo era tranformar isto num botao de RATIO (HTML)....
alguem consegue me ajudar...

-
kugasthelast
- Aprendiz

-
- Mensagens: 71
- Registado: Quinta Jul 19, 2007 14:31
por kugasthelast » Quinta Dez 13, 2007 10:52
alguem...???

-
kugasthelast
- Aprendiz

-
- Mensagens: 71
- Registado: Quinta Jul 19, 2007 14:31
por SIG » Terça Dez 25, 2007 14:52
<script>
function passa(objRad) {
if(objRad) {
caixatexto = document.frm.txt;
if(caixatexto) {
caixatexto.value = objRad.value;
}
}
}
</script>
<form name="frm" method="post" action="teste.html">
<input type="text" name="txt" />
<input type="radio" name="rad" value="1" onclick="passa(this);" />
<input type="radio" name="rad" value="2" onclick="passa(this);" />
<input type="radio" name="rad" value="3" onclick="passa(this);" />
<input type="radio" name="rad" value="4" onclick="passa(this);" />
<input type="radio" name="rad" value="5" onclick="passa(this);" />
</form>
-

SIG
- Aprendiz

-
- Mensagens: 30
- Registado: Domingo Set 26, 2004 23:06
Voltar para Programação
Quem está ligado:
Utilizador a ver este Fórum: Nenhum utilizador registado e 1 visitante