-1
나는 5 개의 필드가있는 양식을 가지고 있지만 아무 것도 발생하지 않으며 양식을 제출하지 않습니다 .earlier는 3 개의 필드 사용자 이름, 전자 메일 및 암호로 구성되어 있으며 시간이 맞지만 잘 작동했지만 지금은 5 개의 필드와 함께 작동하지 않는 여기에 내 자바 스크립트와 HTML 코드입니다. 세 개의 필드와 는 잘 작동하지만 난 5 개 개의 필드에 대한하려고 할 때 난에 내가 실수자바 스크립트 제출 오류
HTML을하고있는 중이 야 어디에 있는지 ..please 제출을 클릭하면 아무 일도 발생하지
<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>
자바 스크립트
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);
}
3 개의 필드가 잘 작동하지만 5 개의 필드를 시도 할 때 제출을 클릭하면 아무 것도 발생하지 않습니다. 제가 실수를하고있는 곳을 말해주십시오.
Sidenote :'setTimeout'에 문자열을 전달하지 말고, 함수를 전달하고'eval'합니다. 'window.setTimeout (document.massimport.submit, 1000); ' –
@diodeus이 양식은 세 필드에서 작동하지만 5 필드 형식에 문제가 있습니다. –