Graciñas
<form action="http:/direccion.com"
method="post" name="inputForm" id="inputForm">
<input type="hidden" name="SID" value="-1" />
<input type="hidden" name="ReturnURL" value="" />
<input type="hidden" name="Resize" value="1" />
<input type="hidden" name="Mode" value="subscribe" />
<table border="0" cellpadding="0" cellspacing="0" id="tablamail">
<tr>
<td colspan="2" class="tdtxt"><p>Inscríbete</p></td>
</tr>
<tr>
<td colspan="2" class="tdtxt"><strong>Email</strong>
<input face="text" name="Email" size="20" value="" /></td>
</tr>
<tr>
<td colspan="2"><a href="javascript: if(testInput()){document.inputForm.Mode.value='upd ate'; document.inputForm.submit();}" class="suscrips">Suscripción</a> <a href="javascript: if(testInput()){document.inputForm.Mode.value='uns ubscribe'; document.inputForm.submit();}" class="suscrips">Baja</a></td>
</tr>
</table>
</form>
<script language='JavaScript' type="text/javascript">
function testInput() {
var Email = new String(document.inputForm.Email.value);
var Correct = true;
CharCount=1;
strLength=Email.length;
while ((CharCount < strLength) && (Email.charAt(CharCount) != '@'))
{
CharCount++
}
if ((CharCount>= strLength) || (Email.charAt(CharCount) != '@'))
{
alert ('Email address not valid.')
Correct = false;
}
else
{
CharCount += 2;
}
while ((CharCount < strLength) && (Email.charAt(CharCount) != '.'))
{
CharCount++
}
if ((CharCount>= strLength - 1) || (Email.charAt(CharCount) != '.'))
{
alert ('Email address not valid.')
Correct = false;
}
return Correct
}
</script>