validering af mail adresse
Jeg har indsat en validering på mail, men den hopper ikke tilbage i feltet, men lader dig i stedet komme videre når du lukker for valideringsbeskeden. Hvad har jeg gjort forkert? Her er hele den lange kode.<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>Netbaseret Akademi Uddannelse</TITLE>
<META http-equiv=Content-Type content="text/html; charset=windows-1252">
<SCRIPT language=javascript
src="Include/menu.js"></SCRIPT>
<META content="MSHTML 6.00.2800.1170" name=GENERATOR>
<link href="Include/styles.css" rel="stylesheet" type="text/css">
</HEAD>
<BODY leftMargin=0 topMargin=10 onload="boolpageloaded = true;">
<script>
function openschooltaske() {
FloatingWindow = window.open("http://comc-www2.uni-c.dk/~comc/comc/sys/taske-stor.cgi","MenuWindow2","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,width=125,height=449,left=0,top=0");
}
</script>
<TABLE cellSpacing=0 cellPadding=0 width=760 align=center border=0>
<TBODY>
<TR>
<TD vAlign=top bgColor=#efefef><IMG
src="Include/logo.gif" border=0>
<TABLE cellSpacing=0 cellPadding=0 width="100%" align=center border=0>
<TBODY>
<TR>
<TD bgColor=white colSpan=2 height=1></TD></TR>
<TR>
<TD
style="BORDER-TOP: white 1px solid; PADDING-LEFT: 5px; BORDER-BOTTOM: #848684 1px solid"
width=1 bgColor=#adaead height=26><IMG
src="Include/green_box.gif"
name=item01 hspace=8 border=0 id=item01></TD>
<TD
style="BORDER-TOP: white 1px solid; PADDING-LEFT: 1px; BORDER-BOTTOM: #848684 1px solid"
width=156 bgColor=#adaead height=25><SPAN class=LeftMenu><A
class=LeftMenu onmouseover="fncCloseMenu();"
onmouseout=fncMouseOut();
href="index.htm">Forside</A></SPAN></TD>
</TR>
<TR>
<TD
style="BORDER-TOP: white 1px solid; PADDING-LEFT: 5px; BORDER-BOTTOM: #848684 1px solid"
width=1 bgColor=#adaead height=26><IMG id=item03 hspace=8
src="Include/green_box.gif" border=0
name=item03></TD>
<TD
style="BORDER-TOP: white 1px solid; PADDING-LEFT: 1px; BORDER-BOTTOM: #848684 1px solid"
width=156 bgColor=#adaead height=25><SPAN class=LeftMenu><A
class=LeftMenu onmouseover=fncCloseMenu();
href="kursusstart.htm">Kursusstart</A></SPAN></TD>
</TR>
<TR>
<TD
style="BORDER-TOP: white 1px solid; PADDING-LEFT: 5px; BORDER-BOTTOM: #848684 1px solid"
width=1 bgColor=#adaead height=26><IMG id=item04 hspace=8
src="Include/green_box.gif" border=0
name=item04></TD>
<TD
style="BORDER-TOP: white 1px solid; PADDING-LEFT: 1px; BORDER-BOTTOM: #848684 1px solid"
width=156 bgColor=#adaead height=25><SPAN class=LeftMenu><A
class=LeftMenu onmouseover="fncShowMenu('04');"
onmouseout=fncMouseOut();
href="uddannelser.htm">Uddannelser</A></SPAN></TD>
</TR>
<TR>
<TD
style="BORDER-TOP: white 1px solid; PADDING-LEFT: 5px; BORDER-BOTTOM: #848684 1px solid"
width=1 bgColor=#adaead height=26><IMG id=item06 hspace=8
src="Include/green_box.gif" border=0
name=item06></TD>
<TD
style="BORDER-TOP: white 1px solid; PADDING-LEFT: 1px; BORDER-BOTTOM: #848684 1px solid"
width=156 bgColor=#adaead height=25><SPAN class=LeftMenu><A
class=LeftMenu onmouseover=fncCloseMenu();
onmouseout=fncMouseOut();
href="adgangskrav.htm">Adgangskrav</A></SPAN></TD>
</TR>
<TR>
<TD
style="BORDER-TOP: white 1px solid; PADDING-LEFT: 5px; BORDER-BOTTOM: #848684 1px solid"
width=1 bgColor=#adaead height=26><IMG id=item07 hspace=8
src="Include/green_box.gif" border=0
name=item06></TD>
<TD
style="BORDER-TOP: white 1px solid; PADDING-LEFT: 1px; BORDER-BOTTOM: #848684 1px solid"
width=156 bgColor=#adaead height=25><SPAN class=LeftMenu><A
class=LeftMenu onmouseover=fncCloseMenu();
onmouseout=fncMouseOut();
href="fag.htm">Fag</A></SPAN></TD>
</TR><TR>
<TD
style="BORDER-TOP: white 1px solid; PADDING-LEFT: 5px; BORDER-BOTTOM: #848684 1px solid"
width=1 bgColor=#adaead height=26><IMG id=item08 hspace=8
src="Include/green_box.gif" border=0
name=item06></TD>
<TD
style="BORDER-TOP: white 1px solid; PADDING-LEFT: 1px; BORDER-BOTTOM: #848684 1px solid"
width=156 bgColor=#adaead height=25><SPAN class=LeftMenu><A
class=LeftMenu onmouseover=fncCloseMenu();
onmouseout=fncMouseOut();
href="overgangsordning.htm">Overgangsordning</A></SPAN></TD>
</TR>
<TR>
<TD
style="BORDER-TOP: white 1px solid; PADDING-LEFT: 5px; BORDER-BOTTOM: #848684 1px solid"
width=1 bgColor=#adaead height=26><IMG id=item09 hspace=8
src="Include/green_box.gif" border=0
name=item07></TD>
<TD
style="BORDER-TOP: white 1px solid; PADDING-LEFT: 1px; BORDER-BOTTOM: #848684 1px solid"
width=156 bgColor=#adaead height=25><SPAN class=LeftMenu><A
class=LeftMenu onmouseover=fncCloseMenu();
href="videreuddannelse.htm">Videreuddannelse</A></SPAN></TD>
</TR>
<TR>
<TD
style="BORDER-TOP: white 1px solid; PADDING-LEFT: 5px; BORDER-BOTTOM: #848684 1px solid"
width=1 bgColor=#adaead height=26><IMG id=item10 hspace=8
src="Include/green_box.gif" border=0
name=item08></TD>
<TD
style="BORDER-TOP: white 1px solid; PADDING-LEFT: 1px; BORDER-BOTTOM: #848684 1px solid"
width=156 bgColor=#adaead height=25><SPAN class=LeftMenu><A
class=LeftMenu onmouseover=fncCloseMenu();
href="tilmelding.htm">Tilmelding</A></SPAN></TD>
</TR>
<TR>
<TD
style="BORDER-TOP: white 1px solid; PADDING-LEFT: 5px; BORDER-BOTTOM: #848684 1px solid"
width=1 bgColor=#adaead height=26><IMG id=item11 hspace=8
src="Include/white_box.gif" border=0
name=item09></TD>
<TD
style="BORDER-TOP: white 1px solid; PADDING-LEFT: 1px; BORDER-BOTTOM: #848684 1px solid"
width=156 bgColor=#adaead height=25><SPAN class=LeftMenu><A
class=LeftMenu onmouseover=fncCloseMenu();
href="kontakt.htm">Kontakt os</A></SPAN></TD>
</TR>
<TR>
<TD
width=1 height=26 bordercolor="#adaead" bgColor=#adaead
style="BORDER-TOP: white 1px solid; PADDING-LEFT: 5px; BORDER-BOTTOM: #848684 1px solid"><IMG
src="Include/green_box.gif"
name=item12 hspace=8 border=0 id=item10></TD>
<TD
width=156 height=25 bordercolor="#adaead" bgColor=#adaead
style="BORDER-TOP: white 1px solid; PADDING-LEFT: 1px; BORDER-BOTTOM: #848684 1px solid"><SPAN class=LeftMenu><A
class=LeftMenu onmouseover=fncCloseMenu();
href="hvem_er_vi.htm">Hvem er vi?</A></SPAN></TD>
</TR></TBODY></TABLE>
</TD>
<TD vAlign=top height="100%">
<TABLE height="100%" cellSpacing=0 cellPadding=0 width="100%" border=0>
<TBODY>
<TR>
<TD vAlign=top colSpan=2>
<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
<!--DWLayoutTable-->
<TBODY>
<TR>
<TD height=26 align=middle bgColor=#000033><div align="right"><a href="sitemap.htm" class="sitemap">Sitemap</a><img src="Include/sitemap.gif" width="27" height="14"></div></TD>
</TR>
<tr>
<TD width="582" height=110
vAlign=top
style="BORDER-TOP: white 1px solid; BORDER-LEFT: #848684 1px solid; BORDER-BOTTOM: #7b797b 1px solid"><img src="Include/netaulogo.gif" width="581" height="108"></TD>
</tr>
<TR>
<TD></TD>
</TR></TBODY></TABLE></TD></TR>
<TR>
<TD vAlign=top align=middle width=425 height="100%">
<TABLE
style="BORDER-TOP: white 1px solid; BORDER-BOTTOM: #7b797b 1px solid"
height=23 cellSpacing=0 cellPadding=0 width="100%" border=0>
<TBODY>
<TR>
<TD style="PADDING-RIGHT: 5px; PADDING-LEFT: 14px"
bgColor=#000033 height=23><IMG
src="Include/gray_box.gif"
align=absMiddle border=0></TD>
<TD width="100%" bgColor=#000033 height=23><SPAN
class=WhiteText>Kontakt os</SPAN></TD>
</TR></TBODY></TABLE>
<P>
<TABLE cellSpacing=0 cellPadding=0 width=100% border=0>
<TBODY>
<TR>
<TD class=NewsHeadlines style="PADDING-BOTTOM: 3px"> </TD>
</TR>
<TR>
<TD valign="top" class=NewsContent> <p>Du kan få tilsendt
yderligere informationsmateriale ved at udfylde skemaet
nedenfor, og klikke på SEND
<script type="text/javascript">
function valider(f){
var t = "\\wáàãââæåçéèêëìíîïñòóôõöøùúûüýÿ";
var regexp = new RegExp("^["+t+"]["+t+"\\.\\-]*@["+t+"]["+t+"\\.\\-]*\\.["+t+"]{2}["+t+"\\.\\-\\/]*$","i");
if (!regexp.test(f.Email.value)){
alert ("Der skal stå en gyldig e-mail adresse");
f.Email.select();
f.Email.focus();
return false;
}
return true;
}
</script>
<form action="/cgi-bin/FormMail.cgi" method="POST">
<input type="hidden" name="recipient" value=" tf@toendhs.dk">
<input type="hidden" name="redirect" value="http://www.netau.dk/tak_kontakt.htm">
<input type="hidden" name="subject" value="Infoblanket Netbaseret Akademi Uddannelse ">
<table width="90%" border="0" align="center" cellpadding="2" bordercolorlight="#C0C0C0" bgcolor="#FFFFFF" class="SurveyOptions">
<tr>
<td>Navn: </td>
<td bgcolor="#C0C0C0">
<input type="text" size="35" name="navn">
*</td>
</tr>
<tr>
<td valign="top">Adresse: </td>
<td valign="top" bgcolor="#C0C0C0">
<input type="text" size="35" name="adresse1">
* <br>
<input type="text" size="35" name="adresse2">
</td>
</tr>
<tr>
<td>Postnr: </td>
<td bgcolor="#C0C0C0">
<input type="text" size="10" maxlength="10"
name="postnr">
* By:
<input type="text" size="25" name="by">
*</td>
</tr>
<tr>
<td>Telefon: </td>
<td bgcolor="#C0C0C0">Privat
<input type="text"
size="12" name="telfpriv">
</td>
</tr>
<tr>
<td>Email</td>
<td bgcolor="#C0C0C0">
<input type="text" name="Email" size="40">
*
</tr>
</table>
<p class="NewsContent">De med * markede felter skal udfyldes</p>
<p><strong>JA tak</strong>, jeg vil gerne</p>
<table width="90%" border="0" align="center" bgcolor="#FFFFFF" class="SurveyOptions">
<tr>
<td width="34" bgcolor="#C0C0C0"> <input type="checkbox"
name="informationsmateriale" value="ON"> </td>
<td width="375">have tilsendt yderligere informationsmateriale.</td>
</tr>
<tr>
<td width="34" bgcolor="#C0C0C0"> <input type="checkbox"
name="tilmeldingsblanket" value="ON"> </td>
<td width="375">have tilsendt tilmeldingsblanket</td>
</tr>
<tr>
<td bgcolor="#C0C0C0"><input type="checkbox" name="opringes"
value="ON"></td>
<td>ringes op af en konsulent på telefonnr.
<input
type="text" name="opringringsnr" size="10"></td>
</tr>
<tr>
<td width="34" bgcolor="#C0C0C0"><input type="checkbox" name="nyhedsbrev" checked
value="ON"> </td>
<td width="375">modtage jeres nyhedsbrev</td>
</tr>
</table>
<div align="left">
<p> </p>
<p align="center">Evt. kommentarer:<br>
<textarea name="brevtekst" cols="40" rows="6" class="SurveyOptions"></textarea>
</p>
</div><div align="center"><center><p> </p>
</center></div><div align="left"><p align="center">
<input name="submit" type="submit" class="SurveyQuestion" onclick="if(valider(this.form))prev(this.form)"
value="Send skema">
<input name="reset" type="reset" class="SurveyOptions" value="Slet skema">
</p>
</div>
</form><p></p></TD></TR>
<TR>
<TD class=NewsLink style="PADDING-BOTTOM: 10px"><div align="center"><a href="java script:history.go(-1);">tilbage</a></div></TD>
</TR>
<TR>
<TD height=22></TD></TR></TBODY></TABLE>
</TD>
<TD style="BORDER-TOP: white 1px solid" vAlign=top width=178
bgColor=#efefef>
<!-- h_meny -->
<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
<TBODY>
<TR>
<TD
style="PADDING-RIGHT: 5px; PADDING-LEFT: 13px; BORDER-BOTTOM: #848684 1px solid"
bgColor=#000033 height=24><IMG
src="Include/gray_box.gif"
align=absMiddle border=0></TD>
<TD style="BORDER-BOTTOM: #848684 1px solid" width="100%"
bgColor=#000033 height=24><SPAN class=WhiteText>Adresse</SPAN></TD>
</TR>
<TR>
<TD height=8></TD></TR></TBODY></TABLE>
<table width="95%" border="0" align="center" class="darkTextnoboldCopy" >
<tr>
<td > Netbaseret Akademi Uddannelses<br>
Sekretariatet<br>
Martin Hammerichsvej 2<br>
DK-6270 Tønder
<p>Telefon + 45 73 72 12 01<br>
Fax + 45 74 72 05 84</p>
</td>
</tr>
</table>
<br>
<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
<TBODY>
<TR>
<TD
style="PADDING-RIGHT: 5px; PADDING-LEFT: 13px; BORDER-BOTTOM: #848684 1px solid"
bgColor=#000033 height=24><IMG
src="Include/gray_box.gif"
align=absMiddle border=0></TD>
<TD style="BORDER-BOTTOM: #848684 1px solid" width="100%"
bgColor=#000033 height=24><SPAN
class=WhiteText>Administration</SPAN></TD>
</TR>
<TR>
<TD height=8></TD>
</TR>
</TBODY>
</TABLE>
<table width="95%" border="0" align="center" class="darkTextnoboldCopy" >
<tr>
<td valign="top" >
Administration og support <br>
Hverdage 8-13<br>
<br>
Telefon 73 72 12 01<br>
<a href="mailto:tf@toendhs.dk"><br>
tf@toendhs.dk</a><a href="mailto: tf@toendhs.dk"><br>
</a> </td>
</tr>
</table>
<br>
<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
<TBODY>
<TR>
<TD
style="PADDING-RIGHT: 5px; PADDING-LEFT: 13px; BORDER-BOTTOM: #848684 1px solid"
bgColor=#000033 height=24><IMG
src="Include/gray_box.gif"
align=absMiddle border=0></TD>
<TD style="BORDER-BOTTOM: #848684 1px solid" width="100%"
bgColor=#000033 height=24><SPAN
class=WhiteText>Uddannelsen</SPAN></TD>
</TR>
<TR>
<TD height=8></TD>
</TR>
</TBODY>
</TABLE>
<table width="100%" border="0" align="center" >
<TR>
<TD
width=1 height=26 bordercolor="#adaead" bgColor=#adaead
style="BORDER-TOP: white 1px solid; PADDING-LEFT: 5px; BORDER-BOTTOM: #848684 1px solid"><IMG
src="Include/green_box.gif"
name=item91 hspace=8 border=0 id=item91></TD>
<TD
width=156 height=25 bordercolor="#adaead" bgColor=#adaead
style="BORDER-TOP: white 1px solid; PADDING-LEFT: 1px; BORDER-BOTTOM: #848684 1px solid"><SPAN class=LeftMenu><A
class=LeftMenu onmouseover="fncCloseMenu();"
onmouseout=fncMouseOut();
href="java script:{}" onclick="openschooltaske();">Log på som kursist</A></SPAN></TD>
</TR>
<TR>
<TD
width=1 height=26 bordercolor="#adaead" bgColor=#adaead
style="BORDER-TOP: white 1px solid; PADDING-LEFT: 5px; BORDER-BOTTOM: #848684 1px solid"><IMG
src="Include/green_box.gif"
name=item92 hspace=8 border=0 id=item92></TD>
<TD
width=156 height=25 bordercolor="#adaead" bgColor=#adaead
style="BORDER-TOP: white 1px solid; PADDING-LEFT: 1px; BORDER-BOTTOM: #848684 1px solid"><SPAN class=LeftMenu><A
class=LeftMenu onmouseover=fncCloseMenu();
href="bogliste.htm">Bogliste</A></SPAN></TD>
</TR>
<TR>
<TD
width=1 height=26 bordercolor="#adaead" bgColor=#adaead
style="BORDER-TOP: white 1px solid; PADDING-LEFT: 5px; BORDER-BOTTOM: #848684 1px solid"><IMG
src="Include/green_box.gif"
name=item93 hspace=8 border=0 id=item93></TD>
<TD
width=156 height=25 bordercolor="#adaead" bgColor=#adaead
style="BORDER-TOP: white 1px solid; PADDING-LEFT: 1px; BORDER-BOTTOM: #848684 1px solid"><SPAN class=LeftMenu><A
class=LeftMenu onmouseover=fncCloseMenu();
href="studieordning.htm">Studieordning</A></SPAN></TD>
</TR>
<TR>
<TD
width=1 height=26 bordercolor="#adaead" bgColor=#adaead
style="BORDER-TOP: white 1px solid; PADDING-LEFT: 5px; BORDER-BOTTOM: #848684 1px solid"><IMG
src="Include/green_box.gif"
name=item94 hspace=8 border=0 id=item94></TD>
<TD
width=156 height=25 bordercolor="#adaead" bgColor=#adaead
style="BORDER-TOP: white 1px solid; PADDING-LEFT: 1px; BORDER-BOTTOM: #848684 1px solid"><SPAN class=LeftMenu><A
class=LeftMenu onmouseover=fncCloseMenu();
href="eksamensdatoer.htm">Eksamensdatoer</A></SPAN></TD>
</TR>
</table>
<!-- /h_meny -->
<P align=center><BR>
<BR>
<BR>
<BR>
<BR>
<BR>
<BR>
<BR>
<BR>
<BR>
</P>
<P align=center> </P>
<P align=center> </P>
</TD>
</TR></TBODY></TABLE></TD></TR>
<TR bgcolor="#000033">
<TD colSpan=2 height=30>
<P align=center><span class="WhiteText">Copyright <font color="#FFFFFF"><b>©</b></font></span><b><font color="#FFFFFF">Netbaseret
Akademi Uddannelse 2003</font></b></P>
</TD></TR></TBODY></TABLE>
<SCRIPT language=javascript
src="Include/menu2.js"></SCRIPT>
</BODY></HTML>