parallon
02-16-2007, 04:45 PM
Hello all. I am having a small, and probably simple problem. The first set of code is the original in which an image was used for a Print function, although I changed it to a button with the second line of code. When testing, the first set of code works fine, but when I change it to the button style, I am getting the following error:
"Object doesn't support this property or method"
Here is the code:
<a href="javascript:print(document.MainForm)"><img src="../images/print.gif" border="0" alt="<%=msg(30)%>"><br> <%=msg(30)%> </a>
<input type="button" name="print" class="mnulabel" title="<%=msg(30)%>" value="<%=msg(30)%>" onClick="javascript:print(document.MainForm)">
By the way, here is the function being called:
<script language="javascript">
function print(frm)
{
var sql = "<%=Server.URLEncode(sSQL)%>"
var URL = "../Rpts/inventory/InvCount.asp?sql=" + sql;
var newWin = window.open(URL,'ReportWnd','menubar=yes,toolbar=no,location=no,status=yes,scrollbars=yes,resizable= yes,width=780,height=580,top=0,left=0');
}
</script>
Any ideas would be greatly appreciated.
Parallon
"Object doesn't support this property or method"
Here is the code:
<a href="javascript:print(document.MainForm)"><img src="../images/print.gif" border="0" alt="<%=msg(30)%>"><br> <%=msg(30)%> </a>
<input type="button" name="print" class="mnulabel" title="<%=msg(30)%>" value="<%=msg(30)%>" onClick="javascript:print(document.MainForm)">
By the way, here is the function being called:
<script language="javascript">
function print(frm)
{
var sql = "<%=Server.URLEncode(sSQL)%>"
var URL = "../Rpts/inventory/InvCount.asp?sql=" + sql;
var newWin = window.open(URL,'ReportWnd','menubar=yes,toolbar=no,location=no,status=yes,scrollbars=yes,resizable= yes,width=780,height=580,top=0,left=0');
}
</script>
Any ideas would be greatly appreciated.
Parallon