I don't know what I"m doing wrong? My object is to have this page pop a messaging stating please make you selection to continue if someone has not checked a checkbox. I'd be willing to make it work anyway somebody can explain well enough for me to do. I've read several tutorial but haven't had any luck so far.
Thanks in advance.
Asp page form: This page automatically poplulates checkboxes based on the contents of a database table. If someon tries to click "Next" without checking anything it needs to pop message.
<Form Name="frmoptions" Type="submit" Method="post" action=Request08Test.asp onsubmit="return Validate()">
<%
SQL = "SELECT ID, SoftwareName, SoftwareDescr, ABC_No, All_ABCs FROM tblAvailableSW WHERE RetiredDate is NULL"
Set RS=ObjConn.execute(SQL)
%> <div align="left" style="padding-left: 6; padding-right: 6; padding-top: 3; padding-bottom: 3">
<div align="center">
<center>
<table border="1" cellpadding="4" width="80%" id="AutoNumber2" bgcolor="#EBEBEB" cellspacing="4" style="border-collapse: collapse">
<tr>
<td width="200%" height="40" bordercolorlight="#C0C0C0"
bordercolordark="#808080" colspan="2" >
<span style="font-variant: small-caps">
<font color="#000080"><b> No Cost Software Request</b></font></span><
/td>
</tr>
<%
While Not RS.EOF
%>
<tr>
<td width="5%" bordercolorlight="#C0C0C0"
bordercolordark="#808080" align="center"><b>
<!-- To get rid of the zero's in ABC no.: Try to write a loop to replace it with ' '. or -->
<!--' sNewNum=FormatNumber(sOldN
um,0,-1) -->
<%
Response.Write " <input type=checkbox name=""Software"" value="""&RS("ID") &"""> "
%>
<% ' Response.Write RS("ABC_NO")%>
</td>
<td style="font-size: 10pt; font-family: Arial; color: #000080">
<b>
<%= RS("ABC_NO") & " - " %>
<%= RS("SoftwareName") & " - " %></b>
<%= RS("SoftwareDescr") & " " %>
<%= " ABC Number(s) required to install selected software: "%>
<%= RS("All_ABCs")%> </td
></tr>
<%
RS.MoveNext
WEnd
%>
<input type=hidden value=<%= RS("ABC_No") %> name=ABC_NO
<input type=hidden value=<%= RS("SoftwareName") %> name=SoftwareName
<input type=hidden value=<%= RS("All_ABCs") %> name=All_ABCs
<tr>
<td width="200%" align="left" style="border-left-width: 1; border-right-style: groove; border-right-width: 1; border-top-style: groove; border-top-width: 1; border-bottom-style: groove; border-bottom-width: 1" colspan="2">
<form method="POST" action="--WEBBOT-SELF--">
<!--webbot bot="SaveResults" u-file="../../_private/for
m_results.
csv" s-format="TEXT/CSV" s-label-fields="TRUE" startspan --><input TYPE="hidden" NAME="VTI-GROUP" VALUE="0"><!--webbot bot="SaveResults" endspan i-checksum="43374" --><p align="right">
<input type="submit" value="Next" name="Submit">
&nbs
p;
<input type="reset" value="Reset" name="Reset"></p>
</form>
end of form **************************
**********
**********
*
JAVASCRIPT FILE:
function validate(frmoptions) {
if ((document.frmoptions.soft
ware.value
=="")||
{
alert ("Please select software by checking checkbox to
continue.")
return false
}
}
Start Free Trial