Jump to content

<!--#include--> directive


crazyswede

Recommended Posts

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

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...