why doesn't this scripted include work?

M

.:mmac:.

I am working around the limitation of a scheduled include web bot and have
this code in an ASP page on a win2k server.

<p><!--webbot bot="HTMLMarkup" startspan --><%
Dim incl
incl = "<!--#include file=" & Chr(34) & "/oyb/w##.htm" & Chr(34) &
"-->"
Dim week
week = Replace(incl,"##",Int((DatePart("y",Date())+6)/7))
Response.Write week & vbCrLf
%><!--webbot bot="HTMLMarkup" endspan --></p>


This page source shows up as :
....<p><!--#include file="/oyb/w3.htm"--></p>...

The included file (/oyb/w3.htm) exists and the source code shows that the
script runs but the page stays blank and nothing is included.
What am I missing? are the comments necessary or part of the problem
BTW the web bot works to bring the page up so it's not a problem with the
included page.
 
J

Jens Peter Karlsen[FP MVP]

You say you are using ASP already so why would you want to use a FP
include too (you can't) instead of using an ASP include.

Regards Jens Peter Karlsen. Microsoft MVP - Frontpage.
 
M

.:mmac:.

Re: why doesn't this scripted include work?I'm not using the FP bot on the same page. I just mentioned that a different page uses a the bot to load the page and that works, so the location or style of the included page must be OK.
The FP bot has to be refreshed manually so I am trying a different approach i.e. ASP, but the page content doesn't show up. That is my issue.
You say you are using ASP already so why would you want to use a FP include too (you can't) instead of using an ASP include.

Regards Jens Peter Karlsen. Microsoft MVP - Frontpage.
 
C

Chris Leeds, MVP-FrontPage

Re: why doesn't this scripted include work?I was under the impression that you couldn't call an include "on the fly". I believe you must do server.execute.

what errors are you generating?

--
Chris Leeds,
Microsoft MVP-FrontPage

ContentSeed: great tool for web masters,
a fantastic convenience for site owners.
http://contentseed.com/
--
I'm not using the FP bot on the same page. I just mentioned that a different page uses a the bot to load the page and that works, so the location or style of the included page must be OK.
The FP bot has to be refreshed manually so I am trying a different approach i.e. ASP, but the page content doesn't show up. That is my issue.
You say you are using ASP already so why would you want to use a FP include too (you can't) instead of using an ASP include.

Regards Jens Peter Karlsen. Microsoft MVP - Frontpage.
 
J

Jens Peter Karlsen[FP MVP]

As I hinted at before, you can't use an FP include on an ASP page. It
wont work.

Regards Jens Peter Karlsen. Microsoft MVP - Frontpage.



_____

From: .:mmac:. [mailto:lost@sea]
Posted At: 16. januar 2005 23:12
Posted To: microsoft.public.frontpage.programming
Conversation: why doesn't this scripted include work?
Subject: Re: why doesn't this scripted include work?


I'm not using the FP bot on the same page. I just mentioned that a
different page uses a the bot to load the page and that works, so the
location or style of the included page must be OK.
The FP bot has to be refreshed manually so I am trying a different
approach i.e. ASP, but the page content doesn't show up. That is my
issue.


You say you are using ASP already so why would you want to use a FP
include too (you can't) instead of using an ASP include.

Regards Jens Peter Karlsen. Microsoft MVP - Frontpage.
 
M

.:mmac:.

Re: why doesn't this scripted include work?Ohh Is that what you meant. Then I REALLY don't understand. I thought you meant I couldn't "include" an ASP page because the included page wouldn't be processed. I must have misunderstood.
BUT... I changed the page to an .htm page and I still have the same problem and it doesn't look like the script is being run. I thought that scripts wouldn't run on an .htm page. So I am really more confused here than I started.
BTW I'm not using any FP web bot on the page, Only the script.

As I hinted at before, you can't use an FP include on an ASP page. It wont work.

Regards Jens Peter Karlsen. Microsoft MVP - Frontpage.




----------------------------------------------------------------------------
From: .:mmac:. [mailto:lost@sea]
Posted At: 16. januar 2005 23:12
Posted To: microsoft.public.frontpage.programming
Conversation: why doesn't this scripted include work?
Subject: Re: why doesn't this scripted include work?


I'm not using the FP bot on the same page. I just mentioned that a different page uses a the bot to load the page and that works, so the location or style of the included page must be OK.
The FP bot has to be refreshed manually so I am trying a different approach i.e. ASP, but the page content doesn't show up. That is my issue.
You say you are using ASP already so why would you want to use a FP include too (you can't) instead of using an ASP include.

Regards Jens Peter Karlsen. Microsoft MVP - Frontpage.
-----Original Message-----
From: .:mmac:. [mailto:[email protected]]
Posted At: 16. januar 2005 21:48
Posted To: microsoft.public.frontpage.programming
Conversation: why doesn't this scripted include work?
Subject: why doesn't this scripted include work?


I am working around the limitation of a scheduled include web
bot and have this code in an ASP page on a win2k server.

<p><!--webbot bot="HTMLMarkup" startspan --><%
Dim incl
incl = "<!--#include file=" & Chr(34) &
"/oyb/w##.htm" & Chr(34) & "-->"
Dim week
week = Replace(incl,"##",Int((DatePart("y",Date())+6)/7))
Response.Write week & vbCrLf
%><!--webbot bot="HTMLMarkup" endspan --></p>


This page source shows up as :
...<p><!--#include file="/oyb/w3.htm"--></p>...

The included file (/oyb/w3.htm) exists and the source code
shows that the
script runs but the page stays blank and nothing is included.
What am I missing? are the comments necessary or part of the problem
BTW the web bot works to bring the page up so it's not a
problem with the
included page.
 
M

.:mmac:.

Re: why doesn't this scripted include work?With this script from test1.asp:

<!--webbot bot="HTMLMarkup" startspan -->
<% Option Explicit
'*
Dim strOTF
strOTF = Request.ServerVariables("PATH_TRANSLATED")
strOTF = Left(strOTF,InStrRev(strOTF,"\"))
strOTF = strOTF & "w" & Int((DatePart("y",Date())+6)/7) & ".htm"
'*
Dim objFSO
Set objFSO = CreateObject("Scripting.FileSystemObject")
If objFSO.FilExists(strOTF) Then
Dim objOTF
Set objOTF = objFSO.OpenTextFile(strOTF,1)
strOTF = objOTF.ReadAll()
Set objOTF = Nothing
End If
Set objFSO = Nothing
'*
Response.Write strOTF
%>
<!--webbot bot="HTMLMarkup" endspan -->

I get this error:
Microsoft VBScript compilation error '800a0400'
Expected statement
/OYB/Test1.asp, line 39
Option Explicit
^


WIth this script from page test2.asp:
<!--webbot bot="HTMLMarkup" startspan --><%
Dim incl
incl = "<!--#include file=" & Chr(34) & "/oyb/w##.htm" & Chr(34) & "-->"
Dim week
week = Replace(incl,"##",Int((DatePart("y",Date())+6)/7))
Response.Write week & vbCrLf
%><!--webbot bot="HTMLMarkup" endspan -->

I just get no included page. The rest of the page works i.e. shared borders, but no included content.
Note that both pages are .asp, renaming to .htm doesn't work either.
Also note that the lines:<!--webbot bot="HTMLMarkup" endspan --> are needed or the source gets reformatted really ugly. That may be a problem in itself, I don't know

I was under the impression that you couldn't call an include "on the fly". I believe you must do server.execute.

what errors are you generating?

--
Chris Leeds,
Microsoft MVP-FrontPage

ContentSeed: great tool for web masters,
a fantastic convenience for site owners.
http://contentseed.com/
--
I'm not using the FP bot on the same page. I just mentioned that a different page uses a the bot to load the page and that works, so the location or style of the included page must be OK.
The FP bot has to be refreshed manually so I am trying a different approach i.e. ASP, but the page content doesn't show up. That is my issue.
You say you are using ASP already so why would you want to use a FP include too (you can't) instead of using an ASP include.

Regards Jens Peter Karlsen. Microsoft MVP - Frontpage.
-----Original Message-----
From: .:mmac:. [mailto:[email protected]]
Posted At: 16. januar 2005 21:48
Posted To: microsoft.public.frontpage.programming
Conversation: why doesn't this scripted include work?
Subject: why doesn't this scripted include work?


I am working around the limitation of a scheduled include web
bot and have this code in an ASP page on a win2k server.

<p><!--webbot bot="HTMLMarkup" startspan --><%
Dim incl
incl = "<!--#include file=" & Chr(34) &
"/oyb/w##.htm" & Chr(34) & "-->"
Dim week
week = Replace(incl,"##",Int((DatePart("y",Date())+6)/7))
Response.Write week & vbCrLf
%><!--webbot bot="HTMLMarkup" endspan --></p>


This page source shows up as :
...<p><!--#include file="/oyb/w3.htm"--></p>...

The included file (/oyb/w3.htm) exists and the source code
shows that the
script runs but the page stays blank and nothing is included.
What am I missing? are the comments necessary or part of the problem
BTW the web bot works to bring the page up so it's not a
problem with the
included page.
 
J

Jens Peter Karlsen[FP MVP]

Read this article:
http://www.4guysfromrolla.com/webtech/022504-1.shtml

I believe that will solve your problem.

Regards Jens Peter Karlsen. Microsoft MVP - Frontpage.



_____

From: .:mmac:. [mailto:lost@sea]
Posted At: 17. januar 2005 01:14
Posted To: microsoft.public.frontpage.programming
Conversation: why doesn't this scripted include work?
Subject: Re: why doesn't this scripted include work?


Ohh Is that what you meant. Then I REALLY don't understand. I thought
you meant I couldn't "include" an ASP page because the included page
wouldn't be processed. I must have misunderstood.
BUT... I changed the page to an .htm page and I still have the same
problem and it doesn't look like the script is being run. I thought
that scripts wouldn't run on an .htm page. So I am really more confused
here than I started.
BTW I'm not using any FP web bot on the page, Only the script.


As I hinted at before, you can't use an FP include on an ASP page. It
wont work.

Regards Jens Peter Karlsen. Microsoft MVP - Frontpage.



_____

From: .:mmac:. [mailto:lost@sea]
Posted At: 16. januar 2005 23:12
Posted To: microsoft.public.frontpage.programming
Conversation: why doesn't this scripted include work?
Subject: Re: why doesn't this scripted include work?


I'm not using the FP bot on the same page. I just mentioned that a
different page uses a the bot to load the page and that works, so the
location or style of the included page must be OK.
The FP bot has to be refreshed manually so I am trying a different
approach i.e. ASP, but the page content doesn't show up. That is my
issue.


You say you are using ASP already so why would you want to use a FP
include too (you can't) instead of using an ASP include.

Regards Jens Peter Karlsen. Microsoft MVP - Frontpage.
-----Original Message-----
From: .:mmac:. [mailto:[email protected]]
Posted At: 16. januar 2005 21:48
Posted To: microsoft.public.frontpage.programming
Conversation: why doesn't this scripted include work?
Subject: why doesn't this scripted include work?


I am working around the limitation of a scheduled include web
bot and have this code in an ASP page on a win2k server.

<p><!--webbot bot="HTMLMarkup" startspan --><%
Dim incl
incl = "<!--#include file=" & Chr(34) &
"/oyb/w##.htm" & Chr(34) & "-->"
Dim week
week = Replace(incl,"##",Int((DatePart("y",Date())+6)/7))
Response.Write week & vbCrLf
%><!--webbot bot="HTMLMarkup" endspan --></p>


This page source shows up as :
...<p><!--#include file="/oyb/w3.htm"--></p>...

The included file (/oyb/w3.htm) exists and the source code
shows that the
script runs but the page stays blank and nothing is included.
What am I missing? are the comments necessary or part of the problem
BTW the web bot works to bring the page up so it's not a
problem with the
included page.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top