crazyswede Posted November 29, 2012 Share Posted November 29, 2012 My data is in an *.mdb file, the rs object. This PrintTemplate is used many times throughout my program. In the past, I had many prints of the same template, but now I want just one print and let the compiler handle all the others. In the past, using the old way, everything worked great, but using the new, (the function), it doesn’t. Passing the object seems to be the problem. Below is the error message and my code. Microsoft JScript runtime error '800a01b6' Object doesn't support this property or method /books/BooksList.asp, line 260 ------------- I put this near the top of page --------------------------- <p><!--#include file="PrintTemplate.inc"--></p> --------------- here I call it ------------------------------- PrintTemplate.inc(); //call this function ------------- Contents of PrintTemplate.inc ---------------------------<%function PrintTemplate( rs ){if( rs("fforegrnd").Value == "tag" || rs("fforegrnd").Value == "tag " ) //line 96 TableColor = TabColor; // = "#FF8429";else TableColor = "black"; //RegularColor ; %><TD ALIGN=left NOWRAP BGCOLOR= "<% Response.Write( TableColor ) %>" ><input type="radio" name= "RecnumToModify" value= "<% Response.Write( recnum ) %>" > <% Response.Write( recnum ) %>) </TD> <TD ALIGN=left NOWRAP BGCOLOR= "<% Response.Write( TableColor ) %>" ><input type="radio" name= "RecnumToModify" value= "<% Response.Write( recnum ) %>" > <% Response.Write( recnum ) %>) </TD> <TD ALIGN=left NOWRAP BGCOLOR= "<% Response.Write( TableColor ) %>" ><% Response.Write( rs("fyear").Value ); %> </TD> <TD ALIGN=left NOWRAP BGCOLOR= "<% Response.Write( TableColor ) %>" > <% Response.Write( rs("fmonth").Value ); %> </TD> <TD ALIGN=left NOWRAP BGCOLOR= "<% Response.Write( TableColor ) %>" > <% Response.Write( rs("fbank").Value ); %> </TD> <TD ALIGN=left NOWRAP BGCOLOR= "<% Response.Write( TableColor ) %>" > <% Response.Write( rs("finitials").Value ); %> </TD> <TD ALIGN=left NOWRAP BGCOLOR= "<% Response.Write( TableColor ) %>" > <% Response.Write( rs("ftype").Value ); %> </TD> <TD ALIGN=left NOWRAP BGCOLOR= "<% Response.Write( TableColor ) %>" > <% Response.Write( rs("fcheck").Value ); %> </TD> <TD ALIGN=left NOWRAP BGCOLOR= "<% Response.Write( TableColor ) %>" > <% Response.Write( rs("fdate").Value ); %> </TD> <TD ALIGN=left NOWRAP BGCOLOR= "<% Response.Write( TableColor ) %>" > <% Response.Write( rs("fdescription").Value ); %> </TD> <TD ALIGN=right NOWRAP BGCOLOR= "<% Response.Write( TableColor ) %>" > <% Response.Write( fdebit.toFixed(2) ); %> </TD> <TD ALIGN=right NOWRAP BGCOLOR= "<% Response.Write( TableColor ) %>" > <% Response.Write( fcredit.toFixed(2) ); %> </TD> <TD ALIGN=center NOWRAP BGCOLOR= "<% Response.Write( TableColor ) %>" > <% Response.Write( rs("fproject").Value ); %> </TD> <TD ALIGN=left NOWRAP BGCOLOR= "<% Response.Write( TableColor ) %>" > <% Response.Write( rs("fmsc1").Value ); %> </TD> <TD ALIGN=left NOWRAP BGCOLOR= "<% Response.Write( TableColor ) %>" > <% Response.Write( rs("fmsc2").Value ); %> </TD> <TD ALIGN=left NOWRAP BGCOLOR= "<% Response.Write( TableColor ) %>" > <% Response.Write( rs("fmsc3").Value ); %> </TD> <TD ALIGN=left NOWRAP BGCOLOR= "<% Response.Write( TableColor ) %>" > <% Response.Write( rs("fmsc4").Value ); %> </TD> <TD ALIGN=left NOWRAP BGCOLOR= "<% Response.Write( TableColor ) %>" > <% Response.Write( rs("fmsc5").Value ); %> </TD> <TD ALIGN=left NOWRAP BGCOLOR= "<% Response.Write( TableColor ) %>" > <% Response.Write( rs("fmsc6").Value ); %> </TD> <TD ALIGN=left NOWRAP BGCOLOR= "<% Response.Write( TableColor ) %>" > <% Response.Write( rs("fmsc7").Value ); %> </TD> </TR><%}%> Link to comment Share on other sites More sharing options...
justsomeguy Posted November 29, 2012 Share Posted November 29, 2012 The function is called PrintTemplate, not PrintTemplate.inc. When you try to call PrintTemplate.inc() Javascript sees that as calling a method called inc that is defined on an object called PrintTemplate. 1 Link to comment Share on other sites More sharing options...
crazyswede Posted December 1, 2012 Author Share Posted December 1, 2012 (edited) Is this where I ask my question to continue my thread? My script now is working just great. Thanks Edited December 1, 2012 by crazyswede Link to comment Share on other sites More sharing options...
crazyswede Posted December 1, 2012 Author Share Posted December 1, 2012 Is this where I ask my question to continue my thread? My script now is working just great. Thanks Link to comment Share on other sites More sharing options...
thescientist Posted December 2, 2012 Share Posted December 2, 2012 if you have more questions related to this topic then yes. If you have a different question about something else, then make a new thread. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now