I
ibsimneej
Someone help me with my code. I copied off a JS from the internet and
tried to modified it in my asp script but it doesn't work. It's
giving me the message: Line:28 Char1 Error: 'document.a294.reporttype'
is null or not an object.
Thanks,
IB
Here is part of my code, any Ideas?:
__________________________________________________________________________
<object RUNAT="Server" ID="Conn" PROGID="ADODB.Connection"></object>
<% RESPONSE.BUFFER=true %>
<HTML>
<HEAD>
<META http-equiv="Content-Language" CONTENT="en-us">
<META http-equiv="Content-Type" CONTENT="text/html;
charset=windows-1252">
<TITLE>This is my test report</TITLE>
</HEAD>
<BODY>
<%
SERVER.SCRIPTTIMEOUT = 480
Conn.CommandTimeout = 480
%>
<!--#include virtual="rep/mgr/connect.asp"-->
<div align="center">
<form action="Thisisatest.asp" method="POST" align="center">
<center>
<table border="0" cellpadding="0" cellspacing="0" width="348">
<form name="a294" >
<tr>
<td width="319" align="right" colspan="3" bgcolor="#000080">
<p align="center"><b><font face="Arial" color="#FFFFFF">Test
Report</font></b></td>
</tr>
<tr>
<td width="355" align="left" style="background-color:#FFFFD7"
colspan="3"><font face="Arial" size="2"><b>Select Report to Run:
</b></font>
<select name="reporttype" size="1" style="background-color:#FFFFD7"
onChange="displaydesc(document.a294.reporttype.selectedIndex)">
<option value="c1">Choice number 1</option>
<option value="c2">Choice number 2</option>
<option value="c3">Choice number 3</option>
<option value="c4">Choice number 4</option>
</selected>
</form>
</td>
</tr>
<tr>
<td colspan="3" width="348" bgcolor="#CCCCCC">
<hr noshade size="2">
</td>
<tr>
<td width="355" align="center" bgcolor="#CCCCCC"
colspan="3"><font face="Arial" size="2"><b>File Status: </b></font>
<select size="1" name="filestatus">
<Option value ="All">All Un/completed </Option>
<Option value ="uncompletee">Uncompleted </Option>
<Option value ="completed">Completed </Option>
</select></td>
</tr>
<tr>
<td width="319" align="right" colspan="3"
bgcolor="#CCCCCC"> </td>
</tr>
<span id="descriptions" align="left" style="font: 13px Arial">
</span>
<script>
/***********************************************
* Drop down menu w/ description- © Dynamic Drive
(www.dynamicdrive.com)
* This notice must stay intact for use
* Visit http://www.dynamicdrive.com/ for full source code
***********************************************/
//CUSTOMIZE TEXT DESCRIPTIONS FOR LINKS ABOVE
var textdisplay=new Array()
textdisplay[0]="Choice number 1"
textdisplay[1]="Choice number 2"
textdisplay[2]="Choice number 3"
textdisplay[3]="Choice number 4"
function jumptolink(what){
var selectedopt=document.a294.reporttype.options[what]
if (document.getElementById &&
selectedopt.getAttribute("target")=="newwin")
window.open(selectedopt.value)
else
window.location=selectedopt.value
}
function displaydesc(which){
if (document.all)
descriptions.innerHTML=textdisplay[which]
else if (document.getElementById)
document.getElementById("descriptions").innerHTML=textdisplay[which]
}
displaydesc(document.a294.reporttype.selectedIndex)
document.a294.reporttype.options[0].selected=true
</script>
</table>
</center>
</form>
</div>
</body>
</html>
tried to modified it in my asp script but it doesn't work. It's
giving me the message: Line:28 Char1 Error: 'document.a294.reporttype'
is null or not an object.
Thanks,
IB
Here is part of my code, any Ideas?:
__________________________________________________________________________
<object RUNAT="Server" ID="Conn" PROGID="ADODB.Connection"></object>
<% RESPONSE.BUFFER=true %>
<HTML>
<HEAD>
<META http-equiv="Content-Language" CONTENT="en-us">
<META http-equiv="Content-Type" CONTENT="text/html;
charset=windows-1252">
<TITLE>This is my test report</TITLE>
</HEAD>
<BODY>
<%
SERVER.SCRIPTTIMEOUT = 480
Conn.CommandTimeout = 480
%>
<!--#include virtual="rep/mgr/connect.asp"-->
<div align="center">
<form action="Thisisatest.asp" method="POST" align="center">
<center>
<table border="0" cellpadding="0" cellspacing="0" width="348">
<form name="a294" >
<tr>
<td width="319" align="right" colspan="3" bgcolor="#000080">
<p align="center"><b><font face="Arial" color="#FFFFFF">Test
Report</font></b></td>
</tr>
<tr>
<td width="355" align="left" style="background-color:#FFFFD7"
colspan="3"><font face="Arial" size="2"><b>Select Report to Run:
</b></font>
<select name="reporttype" size="1" style="background-color:#FFFFD7"
onChange="displaydesc(document.a294.reporttype.selectedIndex)">
<option value="c1">Choice number 1</option>
<option value="c2">Choice number 2</option>
<option value="c3">Choice number 3</option>
<option value="c4">Choice number 4</option>
</selected>
</form>
</td>
</tr>
<tr>
<td colspan="3" width="348" bgcolor="#CCCCCC">
<hr noshade size="2">
</td>
<tr>
<td width="355" align="center" bgcolor="#CCCCCC"
colspan="3"><font face="Arial" size="2"><b>File Status: </b></font>
<select size="1" name="filestatus">
<Option value ="All">All Un/completed </Option>
<Option value ="uncompletee">Uncompleted </Option>
<Option value ="completed">Completed </Option>
</select></td>
</tr>
<tr>
<td width="319" align="right" colspan="3"
bgcolor="#CCCCCC"> </td>
</tr>
<span id="descriptions" align="left" style="font: 13px Arial">
</span>
<script>
/***********************************************
* Drop down menu w/ description- © Dynamic Drive
(www.dynamicdrive.com)
* This notice must stay intact for use
* Visit http://www.dynamicdrive.com/ for full source code
***********************************************/
//CUSTOMIZE TEXT DESCRIPTIONS FOR LINKS ABOVE
var textdisplay=new Array()
textdisplay[0]="Choice number 1"
textdisplay[1]="Choice number 2"
textdisplay[2]="Choice number 3"
textdisplay[3]="Choice number 4"
function jumptolink(what){
var selectedopt=document.a294.reporttype.options[what]
if (document.getElementById &&
selectedopt.getAttribute("target")=="newwin")
window.open(selectedopt.value)
else
window.location=selectedopt.value
}
function displaydesc(which){
if (document.all)
descriptions.innerHTML=textdisplay[which]
else if (document.getElementById)
document.getElementById("descriptions").innerHTML=textdisplay[which]
}
displaydesc(document.a294.reporttype.selectedIndex)
document.a294.reporttype.options[0].selected=true
</script>
</table>
</center>
</form>
</div>
</body>
</html>