HI
I'm trying to call the functions below from my run button to check if my select and a radio option have been selected if not sent A msg box.
I keep getting does't support this method or proprty error message does any one kow what i'm doing wrong.
I would apperacate you input.
Thanks
Dave
function ChoiceValidater(radGroup)
dim i
ChoiceValidater=false
'loop through radio buttons to see if checked
for i=0 to radGroup.lenght-1
'if one is checked we have a valid option
If radgroup(i).checked =true then ChoiceValidater=true
next
end function
'*****************************************************************************
function CheckForm()
' check if a platformand option have been chosen
dim svaildity
If report_name<>"" and ChoiceValidater(form1.reportRadio)=true then
form1.submit
else
if report_name="" and ChoiceValidater(form1.reportRadio)=false then
Msgbox=("You must select a platforn and a option to run a report."
else
if report_name<>"" and ChoiceValidater(form1.reportRadio)=false then
Msgbox=("You Must also select an option to run a report."
else
if report_name="" and ChoiceValidater(form1.reportRadio)=true then
Msgbox=("You Must also select a report to run a report."
end if
end if
end if
end if
end function
'***********here's the select and radi button group*********
<form name="form1" id=form1 action="" method="post">
<div align="center">
<table border="1" cols="4" width="60%">
<tr style="cols:4">
<th width="20%" colspan="2" ><strong>Select Plateform:</strong></th>
<td width="40%" colspan="2" >
<select style="type:text" size="width:55" name="report_name" style="font-family:monospace">
<option style="font-family:monospace" value="<%'= rs1("report_name"%>"
<% if rs1("report_name"= request("report_name"then
%>SELECTED<%
end if
%>
>
<%
Response.Write (rs1("report_name")
rs1.MoveNext()
%>
</option>
<%loop %>
</select>
</td>
</tr>
</table>
<!-- option to run report-->
<table border="1" cols="4" width="60%">
<tr align="left" colspan=4">
<th align="left" width="60%" colspan="4" style="font-family:monospace"> <input type="radio" id= "reportRadio" name="reportRadio" value="A" /><strong>Select Monthly:</strong>
</th>
</tr>
<tr align="left" colspan=4">
<th align="left" width="60%" colspan="4" style="font-family:monospace"> <input type="radio" id= "reportRadio" name="reportRadio" value="B" /><strong>Select Monthly:</strong>
</th>
</tr>
<tr align="left" colspan=4">
<th align="left" width="60%" colspan="4" style="font-family:monospace"> <input type="radio" id= "reportRadio" name="reportRadio" value="C" /><strong>Select Yearly:</strong>
</th>
</tr>
</table>
</div>
<br/>
<br/>
<br/>
<br/>
'******************button that suppouse to check if selected******************
<div align="center">
<table width="100%" align="center" cols="1" border="0">
<tr>
<td> </td>
</tr>
<tr>
<td> </td>
</tr>
<tr align="center">
<td>
<input alt="Run Report" type="button" value="RUN"style="height:22px; width:173px;" id="CheckForm" name="CheckForm" onclick="CheckForm()"/>
</td>
</tr>
</table>
</div>
</form>
I'm trying to call the functions below from my run button to check if my select and a radio option have been selected if not sent A msg box.
I keep getting does't support this method or proprty error message does any one kow what i'm doing wrong.
I would apperacate you input.
Thanks
Dave
function ChoiceValidater(radGroup)
dim i
ChoiceValidater=false
'loop through radio buttons to see if checked
for i=0 to radGroup.lenght-1
'if one is checked we have a valid option
If radgroup(i).checked =true then ChoiceValidater=true
next
end function
'*****************************************************************************
function CheckForm()
' check if a platformand option have been chosen
dim svaildity
If report_name<>"" and ChoiceValidater(form1.reportRadio)=true then
form1.submit
else
if report_name="" and ChoiceValidater(form1.reportRadio)=false then
Msgbox=("You must select a platforn and a option to run a report."
else
if report_name<>"" and ChoiceValidater(form1.reportRadio)=false then
Msgbox=("You Must also select an option to run a report."
else
if report_name="" and ChoiceValidater(form1.reportRadio)=true then
Msgbox=("You Must also select a report to run a report."
end if
end if
end if
end if
end function
'***********here's the select and radi button group*********
<form name="form1" id=form1 action="" method="post">
<div align="center">
<table border="1" cols="4" width="60%">
<tr style="cols:4">
<th width="20%" colspan="2" ><strong>Select Plateform:</strong></th>
<td width="40%" colspan="2" >
<select style="type:text" size="width:55" name="report_name" style="font-family:monospace">
<option style="font-family:monospace" value="<%'= rs1("report_name"%>"
<% if rs1("report_name"= request("report_name"then
%>SELECTED<%
end if
%>
>
<%
Response.Write (rs1("report_name")
rs1.MoveNext()
%>
</option>
<%loop %>
</select>
</td>
</tr>
</table>
<!-- option to run report-->
<table border="1" cols="4" width="60%">
<tr align="left" colspan=4">
<th align="left" width="60%" colspan="4" style="font-family:monospace"> <input type="radio" id= "reportRadio" name="reportRadio" value="A" /><strong>Select Monthly:</strong>
</th>
</tr>
<tr align="left" colspan=4">
<th align="left" width="60%" colspan="4" style="font-family:monospace"> <input type="radio" id= "reportRadio" name="reportRadio" value="B" /><strong>Select Monthly:</strong>
</th>
</tr>
<tr align="left" colspan=4">
<th align="left" width="60%" colspan="4" style="font-family:monospace"> <input type="radio" id= "reportRadio" name="reportRadio" value="C" /><strong>Select Yearly:</strong>
</th>
</tr>
</table>
</div>
<br/>
<br/>
<br/>
<br/>
'******************button that suppouse to check if selected******************
<div align="center">
<table width="100%" align="center" cols="1" border="0">
<tr>
<td> </td>
</tr>
<tr>
<td> </td>
</tr>
<tr align="center">
<td>
<input alt="Run Report" type="button" value="RUN"style="height:22px; width:173px;" id="CheckForm" name="CheckForm" onclick="CheckForm()"/>
</td>
</tr>
</table>
</div>
</form>