I have a form where five fields are there but when i click on submit nothing happens and it is not submitting the form .earlier it was with three field username ,email and password and that time it was working fine but now with 5 fields its not working here is my java script and html code.
with three fields its working fine but when i try for five fields nothing happens when i click on submit ..please tell where i am doing mistake
HTML
<form name="massimport" action="import.php" method="post">
<div id="status1">
<tr>
<td class="input-labels">
<input type="hidden"
style="width:220px"
value="Id"
name="myid"
size="40"
onkeypress="return submitenter(this,event)"
onmouseout="style.borderColor='#999999'"
onmouseover="style.borderColor='#FFEB70'"
onblur="style.borderColor='#999999';"
onfocus="style.borderColor='#FFEB70';"
id="myid"
class="inputbox">
</td>
</tr>
<tr>
<td height="30">
<div class="signup-labels">
Full Name
</div>
</td>
<td align="left" class="input-labels">
<input type="hidden"
value="Fullname"
onkeypress="return submitenter(this,event)"
onmouseout="style.borderColor='#999999'"
onmouseover="style.borderColor='#FFEB70'"
onblur="style.borderColor='#999999';"
onfocus="style.borderColor='#FFEB70';"
name="clientname"
style="margin-bottom:6px; "
size="24" class="inputbox">
</td>
</tr>
</div>
<table cellspacing="0" cellpadding="0" border="0" class="tableimport">
<tbody>
<tr>
<td height="30">
<div class="signup-labels">
Username @Way2enjoy
</div>
</td>
<td align="left" class="input-labels">
<input type="text"
style="width:167px"
class="fpost "
value=""
name="username"
size="40" id="username">
</td>
</tr>
<tr>
<td height="30">
<div class="signup-labels">
Your Name :
</div>
</td>
<td align="left" class="input-labels">
<input class="inputbox"
size="24"
style="margin-bottom:6px; "
name="clientname"
onfocus="style.borderColor='#FFEB70';"
onblur="style.borderColor='#999999';"
onmouseover="style.borderColor='#FFEB70'"
onmouseout="style.borderColor='#999999'"
onkeypress="return submitenter(this,event)">
</td>
</tr>
<tr>
<td height="30" width="115">
<div class="signup-labels">
Email Address :
</div>
</td>
<td align="left" class="input-labels">
<input onkeypress="return submitenter(this,event)"
onmouseout="style.borderColor='#999999'"
onmouseover="style.borderColor='#FFEB70'"
onblur="style.borderColor='#999999';"
onfocus="style.borderColor='#FFEB70';" class="inputbox"
style="margin-top: 2px; border-color: rgb(153, 153, 153);"
name="username" size="24">
<select onblur="style.borderColor='#999999';"
onfocus="style.borderColor='#FFEB70';"
onchange="if(document.massimport.username.value==''){document.massimport.username.focus();} else{document.massimport.password.focus();}"
class="comboservice"
name="service">
<option value="aol">@aol.com</option>
<option value="fastmail">@fastmail.fm</option>
<option value="gmail">@gmail.com</option>
<option value="googlemail">@googlemail.com</option>
<option value="gmx.net">@gmx.net</option>
<option value="hotmail">@hotmail.com</option>
<option value="icqmail">@icqmail.com</option>
<option value="live">@live.com</option>
<option value="lycos">@lycos.com</option>
<option value="maildotcom">@mail.com </option>
<option value="msn">@msn.com </option>
<option value="rediffmail">@rediffmail.com</option>
<option value="rocketmail">@rocketmail.com</option>
<option selected="" value="yahoo">@yahoo.com</option>
<option value="ymail">@ymail.com</option>
<option value="otheremail">Regional domains</option>
</select>
</td>
</tr>
<tr>
<td height="30">
<div class="signup-labels">
Password :
</div>
</td>
<td align="left" class="input-labels">
<input type="password"
onkeypress="return submitenter(this,event)"
onmouseout="style.borderColor='#999999'"
onmouseover="style.borderColor='#FFEB70'"
onblur="style.borderColor='#999999';"
onfocus="style.borderColor='#FFEB70';"
name="password"
size="24" class="inputbox"
style="border-color: rgb(153, 153, 153);">
</td>
</tr>
<tr>
<td>
</td>
<td height="24" align="left" id="errorlabel" class="input-labels">
<div class="message_error" id="message" style="visibility: hidden;">
</div>
</td>
</tr>
<tr>
<td height="44">
</td>
<td align="left" class="input-labels">
<input type="hidden" value="showContacts" id="act" name="act">
<input type="button"
onclick="verimport()"
onmouseout="style.borderColor='#999999'"
onmouseover="style.borderColor='#FFEB70'"
onblur="style.borderColor='#999999';"
onfocus="style.borderColor='#FFEB70';"
value="Invite Friends"
name="masssubmit"
style="width: 120px; border-color: rgb(153, 153, 153);"
class="submit">
</td>
</tr>
</tbody>
</table>
</form>
Javascript
function verimport()
{
<!-- buzz form -->
<?php if ($enablebuzz && $enable_buzz_form) { ?>
var conf = {
frequency: 4000,
spread: 4,
duration: 400
};
<?php } ?>
<!-- end buzz form -->
document.getElementById('message').style.visibility='hidden';
if(trimAll(document.massimport.elements[0].value)=='')
{
document.getElementById('message').style.visibility='visible';
document.getElementById('message').innerHTML='<?php echo($importerjserror5) ?>';
<?php if ($enablebuzz && $enable_buzz_form) { ?> $("#login").vibrate(conf); <?php } ?>
document.massimport.elements[0].focus();
return false;
}
if(trimAll(document.massimport.elements[1].value)=='')
{
document.getElementById('message').style.visibility='visible';
document.massimport.elements[1].focus();
document.getElementById('message').innerHTML='<?php echo($importerjserror1) ?>';
<?php if ($enablebuzz && $enable_buzz_form ) { ?> $("#login").vibrate(conf); <?php } ?>
return false;
}
if(document.massimport.elements[2].options[<?php echo $nr_serv_in_combo ?>].selected==true)
{
if(!check_email(trimAll(document.massimport.elements[1].value)))
{
document.getElementById('message').innerHTML='<?php echo($importerjserror2) ?>';
document.getElementById('message').style.visibility='visible';
document.massimport.elements[1].focus();
<?php if ($enablebuzz && $enable_buzz_form) { ?> $("#login").vibrate(conf); <?php } ?>
return false;
}
}
else
{
if(trimAll(document.massimport.elements[1].value).indexOf('@')!='-1')
{
document.getElementById('message').innerHTML='<?php echo($importerjserror3) ?>';
document.getElementById('message').style.visibility='visible';
document.massimport.elements[1].focus();
<?php if ($enablebuzz && $enable_buzz_form) { ?> $("#login").vibrate(conf); <?php } ?>
return false;
}
}
if(trimAll(document.massimport.elements[3].value)=='')
{
document.getElementById('message').style.visibility='visible';
document.getElementById('message').innerHTML='<?php echo($importerjserror4) ?>';
document.massimport.elements[3].focus();
<?php if ($enablebuzz && $enable_buzz_form) { ?> $("#login").vibrate(conf); <?php } ?>
return false;
}
document.getElementById('message').style.background = 'url(none.jpg)';
document.getElementById('message').style.paddingLeft='1px';
document.getElementById('message').style.visibility='visible';
document.getElementById('message').innerHTML="<img src='images/loader.gif' border=0 hspace=0 vspace=0>";
document.massimport.masssubmit.value='<?php echo($importerformcontrol5) ?>';
document.massimport.masssubmit.disabled=true;
document.getElementById('errorlabel').style.padding='0';
window.setTimeout("document.massimport.submit()",1000);
}
with three fields its working fine but when i try for five fields nothing happens when i click on submit ..please tell where i am doing mistake
You cannot submit a disabled form.