doesnt proceed to next page

admin

Administrator
Staff member
hi again,

thanks to dan drillich for helping me out before. i have another enquiry though if someone is willing to help me.

my page doesnt seem to load to the next page once the data has been verified , it only comes up with an alert message but doesnt proceed. here is the code - what is wrong with it!!

<!--Script for verifying all required fields are entered-->

<!--
function check() {
g=document.application;
if(g.apday.value==""){
alert("You must fill in the application date!");
g.apday.focus();
return false;
}else if(g.apmonth.value==""){
alert("You must fill in the application date!");
g.apmonth.focus();
return false;
}else if(g.apyear.value==""){
alert("You must fill in the application date!");
g.apyear.focus();
return false;
}else if(g.avday.value==""){
alert("You must fill in your availability!");
g.avday.focus();
return false;
}else if(g.avmonth.value==""){
alert("You must fill in your availability!");
g.avmonth.focus();
return false;
}else if(g.avyear.value==""){
alert("You must fill in your availability!");
g.avyear.focus();
return false;
}else if(g.firstname.value==""){
alert("You must enter your First Name!");
g.firstname.focus();
return false;
} else if(g.lastname.value==""){
alert("You must enter your Surname!");
g.lastname.focus();
return false;
} else if(g.bday.value==""){
alert ("You must enter your birthday!");
g.bday.focus();
return false;
} else if(g.bmonth.value==""){
alert ("You must enter your birthday!");
g.bmonth.focus();
return false;
} else if(g.byear.value==""){
alert ("You must enter your birthday!");
g.byear.focus();
return false;
} else if(g.address.value==""){
alert("You must enter your Address!");
g.address.focus();
return false;
} else if(g.postcode.value==""){
alert("You must enter your Post Code!");
g.postcode.focus();
return false;
} else if(g.postaladdress.value==""){
alert("You must enter your Postal Address!");
g.postaladdress.focus();
return false;
} else if(g.email.value==""){
alert("You must enter your Email Address!");
g.email.focus();
return false;
} else if(g.kin.value==""){
alert("You must enter your Next of Kin!");
g.kin.focus();
return false;
} else if(g.kinphone.value==""){
alert("You must enter Next of Kins Contact Phone Number!");
g.kinphone.focus();
return false;
}else {
alert("You may proceed");
return true;
}
}

//-->


<!--Start of form-->

<form name="application" action="workhistory.html">

<center><h2>Employment Applications</h2></center>

<br>

<i><b>NB. All fields with an asterisk are mandatory.</i></b>
<br>
<br>
<br>

<!-- Table 1-->

<table width="100%">

<tr>
<td>Application Date:
<td><input type="text" id="apday" size="2" maxlength="2"/>
/ <input type="text" id="apmonth" size="2" maxlength="2"/>
/ <input type="text" id="apyear" size="4" maxlength="4"/> (dd/mm/yyyy) *

</tr>

<tr>
<td>Availability Date:
<td><input type="text" id="avday" size="2" maxlength="2"/>
/ <input type="text" id="avmonth" size="2" maxlength="2"/>
/ <input type="text" id="avyear" size="4" maxlength="4"/> (dd/mm/yyyy) *
</tr>

</table>

<!-- End of table 1-->

<br>
<br>

<!--Candidate details - personal details-->

<p><h3>1. Candidate Details: </h3></p>

<!--Table 2-->

<table width="100%">

<tr>
<td>Preferred Title:
<td><SELECT NAME="Title">
<option value=http://www.webdeveloper.com/forum/archive/index.php/"mr">Mr</option>
<option value="miss">Miss</option>
<option value="ms">Ms</option>
<option value="mrs">Mrs</option>
<option value="Dr">Dr</option>
<option value="Other">Other</option>
</select>
</tr>

<tr>
<td>First Name:
<td><input type="text" id="firstname" size="15" /> *
<td>Surname:
<td><input type="text" id="lastname" size="15" /> *
</tr>

<tr>
<td>Sex:
<td><input type="radio" name="radio" value="male" /> Male
<td><input type="radio" name="radio" value="female" /> Female
</tr>

<tr>
<td>Date of Birth:
<td colspan="4"><input type="text" id="bday" size="2" maxlength="2"/>
/ <input type="text" id="bmonth" size="2" maxlength="2"/>
/ <input type="text" id="byear" size="4" maxlength="4"/> (dd/mm/yyyy) *

</tr>

</table>

<!--End of table 2-->

<!--Start of table 3-->

<table width="100%">

<tr>
<td>Address:
<td colspan="4"><input type="text" id="address" size="42" /> *
</tr>

<tr>
<td>State:
<td><SELECT NAME="state">
<option value="nsw">NSW</option>
<option value="qld">QLD</option>
<option value="vic">VIC</option>
<option value="act">ACT</option>
<option value="sa">SA</option>
<option value="wa">WA</option>
<option value="nt">NT</option>
<option value="tas">TAS</option>
</select>


<td>Post Code:
<td colspan="2"><input type="text" id="postcode" size="4" maxlength="4"/> *
</tr>

<tr>
<td>Postal Address:
<td colspan="4"><input type="text" id="postaladdress" size="42" /> *
</tr>

<tr>
<td colspan="4"><font size="-1"><b><i>"As Above"</i> If same as residential address.</font></b>
</tr>

<tr>
<td>
</tr>

<tr>
<td>
</tr>

<tr>
<td>State:
<td><SELECT NAME="state">
<option value="nsw">NSW</option>
<option value="qld">QLD</option>
<option value="vic">VIC</option>
<option value="act">ACT</option>
<option value="sa">SA</option>
<option value="wa">WA</option>
<option value="nt">NT</option>
<option value="tas">TAS</option>
</select>


<td>Post Code:
<td colspan="2"><input type="text" id="postcode1" size="4" maxlength="4"/>
</tr>

<tr>
<td>Business Phone:
<td><input type="text" id="phone" size="10" />
<td>Home Phone:
<td><input type="text" id="phone" size="10" />
</tr>

<tr>
<td>Mobile:
<td><input type="text" id="phone" size="10" />
<td>Fax Number:
<td><input type="text" id="phone" size="10" />
</tr>

<tr>
<td>Email Address:
<td colspan="4"><input type="text" id="email" size="20" /> *
</tr>

</table>

<!--End of table 3 -->

<!--Start of table 4-->

<table width="100%">

<tr>
<td>Next Of Kin:
<td><input type="text" id="kin" size="20" /> *
<td>Relationship:
<td><input type="text" id="relation" size="20" />
</tr>

<tr>
<td>Address:
<td colspan="4"><input type="text" id="kinaddress" size="42" />
</tr>

<tr>
<td>State:
<td><SELECT NAME="state">
<option value="nsw">NSW</option>
<option value="qld">QLD</option>
<option value="vic">VIC</option>
<option value="act">ACT</option>
<option value="sa">SA</option>
<option value="wa">WA</option>
<option value="nt">NT</option>
<option value="tas">TAS</option>
</select>


<td>Post Code:
<td colspan="2"><input type="text" id="post code" size="4" maxlength="4"/>
</tr>

<tr>
<td>Contact Phone:
<td colspan="4"><input type="text" id="kinphone" size="10" /> *
</tr>

</table>

<!--End of table 4-->

<!--Start of table 5-->

<table width="100%">

<tr>
<td>Notice Required:
<td><input type="radio" name="radio" value="yes" /> Yes
<td><input type="radio" name="radio" value="no" /> No
<td>Please Specify:
<td><input type="text" id="notice" size="3" /> Weeks
</tr>

</table>

<!--End of table 5-->

<!--Table 6-->

<table width="100%">

<tr>
<td>Position Sought:
<td><input type="checkbox" id="position" value="mining" /> Mining
<td><input type="checkbox" id="position" value="accounts" /> Clerical/Admin/Accounts
</tr>

<tr>
<td>
<td><input type="checkbox" id="position" value="labour" /> Labouring
<td><input type="checkbox" id="position" value="production" /> Production
</tr>

<tr>
<td>
<td><input type="checkbox" id="position" value="govt" > Local Govt
<td><input type="checkbox" id="position" value="machinery" > Machinery Operation
</tr>

<tr>
<td colspan="2">Other (Please Specify):
<td colspan="2"><input type="text" id="other" size="30" >
</tr>

</table>

<!--End of table 6-->

<br>
<br>

<a href="workhistory.html" onClick="return check();">

<center>

<input type="button" value="Next Page" name="applications" align="right" >

</center>

</a>

</form>

<!--End of form-->


sorry theres so much text, its the best i could do.

cheers
 
Back
Top