21. září bude sraz! Od 18.00 v restauraci Tradice v Praze u Anděla
Autor Zpráva
aaabbb2
Profil
Pripajam kod problemu - otazky

[b]Potrebujem nieco ako na stranke http://diskuse.jakpsatweb.cz/index.php?action=registernew
pri zadavani krajiny, ale s tym ze sa vyplnia 2 polia naraz ale roznymi hodnotami[/b]

kod-----------------------------------------------------

<!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>Untitled Document</title>
<style type="text/css">
<!--
.style4 {font-family: Arial, Helvetica, sans-serif; font-size: 14px;}
-->
</style>
</head>
<body>
<p><br />
Potrebujem nieco ako na stranke <a href="http://diskuse.jakpsatweb.cz/index.php?action=registernew" target="_blank">http://diskuse.jakpsatweb.cz/index.php?action=register new<br />
</a>pri zadavani krajiny, ale s tym ze sa vyplnia 2 polia naraz ale roznymi hodnotami<br />
<br />
<br />
<strong>Pokus c.1 s vyberom pomocou radiobuton</strong></p>
<form id="form1" name="form1" method="post" action="">
<table width="500" border="1" cellpadding="2" cellspacing="2" bordercolor="#999999">
<tr>
<td width="132"><span class="style4"><strong>pole1</strong> - slovenske </span></td>
<td width="144"><input type="text" name="pole_slovenske" id="pole1a" /></td>
<td colspan="2" rowspan="2" align="center" valign="middle"><label>
<input type="radio" name="pomocne1" value="ano / yes" id="pomocne1_0" />
áno</label>
<label>
<input type="radio" name="pomocne1" value="nie / no" id="pomocne1_1" />
nie</label></td>
</tr>
<tr>
<td><span class="style4"><strong>pole2</strong> - anglicke </span></td>
<td><input type="text" name="pole_anglicke" id="pole1b" /></td>
</tr>
<tr>
<td colspan="4" bgcolor="#CCCCCC">&nbsp;</td>
</tr>
</table>
</form>
<p>Potrebujem, aby sa po zaskrtnuti<strong> &quot;áno&quot;</strong> do pola1 napísalo <strong>ano</strong> a do pola 2 <strong>yes</strong>,<br />
alebo po pretuknuti na <strong>&quot;nie&quot;</strong> do pola 1 <strong>nie</strong> a do pola 2 <strong>no</strong><br />
<br />
to iste moze byt aj pomocou listu. - tych poloziek radio, pripadne v liste bude viac ako ano a nie.<br />
</p>
<p>- takychto poli potrebujem vo formulari niekolko.<br />
<br />
<strong>Pokus c.2 s vyberom pomocou radiobuton</strong></p>
<form id="form2" name="form2" method="post" action="">
<table width="500" border="1" cellpadding="2" cellspacing="2" bordercolor="#999999">
<tr>
<td width="132"><span class="style4"><strong>pole1</strong> - slovenske </span></td>
<td width="144"><input type="text" name="pole_slovenske2" id="pole2a" /></td>
<td colspan="2" rowspan="2" align="center" valign="middle"><select name="pole2" id="pole2">
<option value="áno / yes">áno</option>
<option value="nie / no">nie</option>
</select> </td>
</tr>
<tr>
<td><span class="style4"><strong>pole2</strong> - anglicke </span></td>
<td><input type="text" name="pole_anglicke2" id="pole2b" /></td>
</tr>
<tr>
<td colspan="4" bgcolor="#CCCCCC">&nbsp;</td>
</tr>
</table>
<br />
</form>
Budem vdacny za kazdu radu, nakolko sa s tym trapim uz dlho a neviem prist na to ako na to *8)<br />
<br />
<br />
pripadne info mozete zaslat aj na <a href="mailto:johnybb@seznam.cz">johnybb</a>
<br />
<br />
dakujem za kazdy napad alebo radu.
</body>
</html>


koniec kodu-----------------------------------------------------
Str4wberry
Profil
Použij checkbox, ne?
aaabbb2
Profil
checkbox nie, nakolko potrebujem do tych poli iba jedinu polozku zo zoznamu ale v 2 jazykoch, pozrite si ten kod, je tam funkcne prepojenie s 1 polom.

Ide o to, ze obsah poli sa uklada do databazy.

Priklad: pri editacii vyberu z "list" ano

nastane to, ze ano sa napise do 1 pola a yes sucasne do 2 pola s tym, ze administrator si moze este do tych poli dopisat dalsi text a nasledne az potom to ulozit do databazy. Prepojenie s DB mam vyriesene, potrebujem iba dotiahnut toto.

Dakujem za kazdy napad, alebo radu. *8) johnybb
aaabbb2
Profil
Pripajam funkcny kod s 1 polom, treba dotiahnut to 2 to znamena, ze to co je v liste sa po vybere polozky musi skopirovat do 1 pola.



-------------------------------------------kod zaciatok

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
<HTML><HEAD><TITLE>formular skuska</TITLE>
<META http-equiv=content-type content=text/html;charset=iso-8859-2><LINK
href="001_soubory/bb_classic_style.css" type=text/css rel=STYLESHEET><LINK
href="/favicon.ico" type=image/x-icon rel=icon><LINK href="/favicon.ico"
type=image/x-icon rel="shortcut icon">
<META content="MSHTML 6.00.2900.3243" name=GENERATOR>
<style type="text/css">
<!--
.style1 {
font-size: 36;
font-weight: bold;
}
-->
</style>
</HEAD>
<BODY class=gbody>
<h1 class="navCell"><span class="warning">TEST 1</span>
<br>

<SCRIPT type=text/javascript>

<!--
function insertCountry() {
var ind;
ind = document.regform.fromSelect.selectedIndex;
ind = document.regform.fromSelect.options[ind].value;
document.regform.from.value = ind;
}
function insertanoo() {
var ind2;
ind2 = document.regform.fromSelect.selectedIndex;
ind2 = document.regform.fromSelect.options[ind2].value;
document.regform.from.value = ind2;
}
//-->

</SCRIPT>
</h1>
<DIV style="TEXT-ALIGN: center"><BR>
<FORM class=formStyle name=regform action=index.php? method=post>
<INPUT type=hidden value=register name=action>
<TABLE class=forums>
<TBODY>
<tr><TD width="15%" rowspan="2" vAlign=top class=caption4 style="TEXT-ALIGN: right"><br>
<br>
TEXT</TD>
<TD width="5%" vAlign=top class=caption4 style="TEXT-ALIGN: right">SK</TD>
<TD width="80%" rowspan="2" class=caption5>
<INPUT maxLength=100 iname=from>
<br>
<INPUT maxLength=100 name=from>
<SELECT onchange=JavaScript:insertCountry(); iname=fromSelect2; name=fromSelect>
<option value="">Vyber položku</option>
<option value="yes">áno</option>
<option value="no">nie</option>
<option value="possible">možno</option>
<option value="iné 1 UKssssssssssssssssssdas asfc dsf asf ads fdsa fdsa fasd ">iné 1 sdf</option>
</SELECT>
<BR><SPAN class=txtSm>
Vyberte zo zoznamu alebo zadajte vlastný text.</SPAN></TD></TR>
<tr>
<TD vAlign=top class=caption4 style="TEXT-ALIGN: right">UK</TD>
</TR>
<tr>
<TD colspan="2" vAlign=top class=caption4 style="TEXT-ALIGN: right">&nbsp;</TD>
<TD width="80%" class=caption5>&nbsp;</TD>
</TR>
<tr><td colspan="2"></TBODY></TABLE>
</FORM></DIV><BR>

-------------------------------------------kod koniec

</BODY></HTML>

Vaše odpověď


Prosím používejte diakritiku a interpunkci.

Ochrana proti spamu. Napište prosím číslo dvě-sta čtyřicet-sedm:

0