Autor Zpráva
Poooool
Profil *
Ahoj, udelal jsem uz jeden web s formularem, kde vsechno postovani funguje. Podle toho modelu jsem udelal dalsi, dal na stejnu server, ale tenhle nebezi a uz absolutne nevim proc. Tedy -presneji - posilani formulare bezi, ale kontrola vyplneni poli nebezi. uz jsem z toho zoufalej

Tenturyje Plz pomozte mi tojekara, rystupije





<HTML>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>PPI</title>
<meta http-equiv="content-type" content="text/html; charset=windows-1250" />
<meta name="keywords" content="" />
<meta name="description" content="" />
<link href="css/styles.css" rel="stylesheet" type="text/css" media="screen" />
<style type="text/css">
<!--
.style2 {color: #0000FF}
-->
</style>
</head>
<body BGCOLOR=#FFFFFF LEFTMARGIN=0 TOPMARGIN=0 MARGINWIDTH=0 MARGINHEIGHT=0 ONLOAD="preloadImages();">>
<center>


<script type="text/javascript">

function newImage(arg)
{
if (document.images) {
rslt = new Image();
rslt.src = arg;
return rslt;
}
}

function changeImages()
{
if (document.images && (preloadFlag == true))
{
for (var i=0; i<changeImages.arguments.length; i+=2)
{
document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
}
}
}

var preloadFlag = false;
function preloadImages()
{
if (document.images)
{
home_over = newImage("images/home-over.jpg");
about_over = newImage("images/about-over.jpg");
products_over = newImage("images/products-over.jpg");
partners_over = newImage("images/partners-over.jpg");
contacts_over = newImage("images/contacts-over.jpg");
preloadFlag = true;
}
}



function change_content(elementname, filename)
{
new Ajax.Updater(elementname, filename);
}


function kontrola_formulare()
{
if(document.getElementById("email").value.length==0)
{
alert("Zadejte email, je to povinný údaj.");
document.getElementById("email").focus();
return false;
}
if(document.getElementById("zprava").value.length==0)
{
alert("Zadejte telefon, je to povinný údaj.");
document.getElementById("zprava").focus();
return false;
}
return true;
}
</script>



<table width=789 border=0 cellpadding=0 cellspacing=0 class="frame">
<tr>
<td colspan=12><img src="images/m1.jpg" width=775 height=73 alt=""></td>
<td width="10"><img src="images/spacer.gif" width=1 height=1 alt=""></td>
</tr>
<tr>
<td colspan=3><a href="#"
onMouseOver="window.status='home'; changeImages('home', 'images/home-over.jpg'); return true;"
onMouseOut="window.status=''; changeImages('home', 'images/home.jpg'); return true;"> <img name="home" src="images/home.jpg" width=154 height=44 border=0 alt="home"></a></td>
<td colspan=9 rowspan=5><img src="images/m2.jpg" width=621 height=183 alt=""></td>
<td><img src="images/spacer.gif" width=1 height=1 alt=""></td>
</tr>
<tr>
<td colspan=3><a href="#"
onMouseOver="window.status='about'; changeImages('about', 'images/about-over.jpg'); return true;"
onMouseOut="window.status=''; changeImages('about', 'images/about.jpg'); return true;"> <img name="about" src="images/about.jpg" width=154 height=30 border=0 alt="about"></a></td>
<td><img src="images/spacer.gif" width=1 height=30 alt=""></td>
</tr>
<tr>
<td colspan=3><a href="#"
onMouseOver="window.status='products'; changeImages('products', 'images/products-over.jpg'); return true;"
onMouseOut="window.status=''; changeImages('products', 'images/products.jpg'); return true;"> <img name="products" src="images/products.jpg" width=154 height=30 border=0 alt="products"></a></td>
<td><img src="images/spacer.gif" width=1 height=30 alt=""></td>
</tr>
<tr>
<td colspan=3><a href="#"
onMouseOver="window.status='partners'; changeImages('partners', 'images/partners-over.jpg'); return true;"
onMouseOut="window.status=''; changeImages('partners', 'images/partners.jpg'); return true;"> <img name="partners" src="images/partners.jpg" width=154 height=30 border=0 alt="partners"></a></td>
<td><img src="images/spacer.gif" width=1 height=30 alt=""></td>
</tr>
<tr>
<td colspan=3><a href="#"
onMouseOver="window.status='contacts'; changeImages('contacts', 'images/contacts-over.jpg'); return true;"
onMouseOut="window.status=''; changeImages('contacts', 'images/contacts.jpg'); return true;"> <img name="contacts" src="images/contacts.jpg" width=154 height=49 border=0 alt="contacts"></a></td>
<td><img src="images/spacer.gif" width=1 height=49 alt=""></td>
</tr>
<tr>
<td colspan=12><img src="images/m3.jpg" width=775 height=13 alt=""></td>
<td><img src="images/spacer.gif" width=1 height=1 alt=""></td>
</tr>
<tr>
<td colspan=5 rowspan=2><img src="images/bp1.jpg" width=239 height=105 alt=""></td>
<td colspan=2 rowspan=2><img src="images/fp1.jpg" width=217 height=105 alt=""></td>
<td width="21" rowspan=9>11</td>
<td colspan=4><img src="images/wel1.jpg" width=292 height=47 alt=""></td>
<td><img src="images/spacer.gif" width=1 height=1 alt=""></td>
</tr>
<tr>
<td height=100 colspan=3 rowspan=2 align="left" valign="top"><span class="text1"></td>
<td width="13" rowspan=2><img src="images/spacer.gif" width=1 height=1 alt=""><img src="images/spacer.gif" width=1 height=54 alt=""></td>
<td><img src="images/spacer.gif" width=1 height=1 alt=""></td>
</tr>
<tr>
<td width="34" rowspan=3>4</td>
<td height=145 colspan=3 rowspan=3 align="left" valign="top"><p><span class="text1"></td>
<td width="21" rowspan=3 align="left" valign="top">6</td>
<td width=186 height=145 rowspan=3 align="left" valign="top"><span class="text1"></td>
<td width="39" rowspan=3 align="left" valign="top">8</td>
<td>&nbsp;</td>
</tr>
<tr>
<td colspan=4 align="left" valign="top"><img src="images/sv1.jpg" width=187 height=30 alt=""></td>
<td><img src="images/spacer.gif" width=1 height=1 alt=""></td>
</tr>
<tr>
<td rowspan=5 colspan=4 align="left" valign="top">

<p>
Chcete zaslat další informace emailem?
<form onSubmit="return kontrola_formulare()" action="send.php" method="post">
<table width="" border="0">
<tr>
<td width="33">Jméno*:</td>
<td width="40"><input name="jmeno" type="text"></td>
</tr>
<tr>
<td width="33">Příjmení*:</td>
<td width="40"><input name="prijmeni" type="text"></td>
</tr>
<tr>
<td width="33">Email*:</td>
<td width="40"><input name="email" type="text"></td>
</tr>
<tr>
<td width="33">Telefon:</td>
<td width="40"><input name="telefon" type="text"></td>
</tr>
<tr>
<td colspan="2" align="center">
<input type="submit" class="button" value="Odeslat">
<input type="reset" class="button" value="Vymazat"></td>
</tr>
<tr>
<td width="33"></td>
<td width="80">><font size="0.75em">* povinny udaj</font></td>
</tr>

</table>

<
Poooool
Profil *
/table>

</form>
</p>
</td>
</tr>
<tr>
<td colspan=6>&nbsp;</td>
<td width="39" valign="top">15</td>
</tr>
<tr>
<td colspan=2 rowspan=3>19</td>
<td height=18 colspan=4 align="left" valign="top">20</td>
<td>16</td>
</tr>
<tr>
<td height=18 colspan=4 align="left" valign="top">21</td>
<td>17</td>
</tr>
<tr>
<td height=35 colspan=4 align="left" valign="top">22</td>
<td>18</td>
</tr>
<tr>
<td colspan=12><img src="images/m4.jpg" width=775 height=3 alt=""></td>
<td><img src="images/spacer.gif" width=1 height=1 alt=""></td>
</tr>
<tr>
<td height=66 colspan=7 align="center" valign="middle" class="text3"><a href="index.html">Home</a> | <a href="index1.html">Více</a> | <a href="restricted.html">Members</a> | <a href="#">Contacts</a></td>
<td height=66 colspan=5 align="center" valign="middle" class="text3">Copyright
© Homeoffice.howto.cz<br>
Designed by TemplateYes - <a href="http://www.templateyes.com/html-templates.htm" target="_blank">Free
Web Templates</a></td>
<td><img src="images/spacer.gif" width=1 height=66 alt=""></td>
</tr>
<tr>
<td><img src="images/spacer.gif" width=34 height=1 alt=""></td>
<td width="12"><img src="images/spacer.gif" width=11 height=1 alt=""></td>
<td width="109"><img src="images/spacer.gif" width=109 height=1 alt=""></td>
<td width="64"><img src="images/spacer.gif" width=64 height=1 alt=""></td>
<td><img src="images/spacer.gif" width=21 height=1 alt=""></td>
<td><img src="images/spacer.gif" width=186 height=1 alt=""></td>
<td><img src="images/spacer.gif" width=31 height=1 alt=""></td>
<td><img src="images/spacer.gif" width=21 height=1 alt=""></td>
<td width="125"><img src="images/spacer.gif" width=125 height=1 alt=""></td>
<td width="157"><img src="images/spacer.gif" width=157 height=1 alt=""></td>
<td width="3"><img src="images/spacer.gif" width=3 height=1 alt=""></td>
<td><img src="images/spacer.gif" width=13 height=1 alt=""></td>
<td></td>
</tr>
</table>
<!-- End ImageReady Slices -->
</center>
</BODY>

</HTML>
Poooool
Profil *
zamozrejnme jsem to tu jen spatne napojil...table konec tam ve formulari je jen jednou, chtel jsem abyste to videli cely (ja vim ze to je na post malinko neprehledny, dal jsem bold pasaze ktere me zajimaji).
ixiik
Profil
Javascriptem voláš
document.getElementById("email")


jenže u emailu nemáš ID definováno. Doplň ID a bude to fungovat.

<input name="email" id="email" type="text">
bohyn
Profil
U telefonu pouzivas v JS id "zprava" misto "telefon"
Edit: u telefonu vlaste taky ID nemas
ixiik
Profil
Krom toho v tom JS voláš jiné input pole než máš v dokumentu.

Kontroluješ email a zpravu, ale v html formu máš jméne, příjmení, email a mobil..
Poooool
Profil *
JUPIIIIIIIIIIIIIIIIIIIIIIIII

dikes,

opravil jsem obe chyby, uz to fachaaaaa

SUPERDIK za odpoved, vubec jsem necekal takovej spiiiid

Poooool

Vaše odpověď

Mohlo by se hodit

Neumíte-li správně určit příčinu chyby, vkládejte odkazy na živé ukázky.
Užíváte-li nějakou cizí knihovnu, ukažte odpovídajícím, kde jste ji vzali.

Užitečné odkazy:

Prosím používejte diakritiku a interpunkci.

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

0