[Javascript] Include Problem

Jason Belanger BELANGERJ at EM.AGR.CA
Fri Oct 26 10:23:16 CDT 2001


Hi Howard,

You cannot have dynamic includes in your pages either by way of JavaScript or ASP. The include section gets processed by the server before you even get the page. There is a way to do it but I suggest you look into the ASP ListServ:

http://list.15seconds.com/scripts/lyris.pl?enter=activeserverpages&text_mode=0

Watch for the wrap.

Jason

Jason Belanger
Web Technologies System Specialist
(613) 759-7809
belangerj at em.agr.ca
http://www.agr.ca/

>>> HowardSalter at penningtonseed.com 10/26/01 11:22AM >>>
I've been beating my head against a wall trying to figure out why I can't
make an include work, so now I'm going to ask you all.

I've got a place in the middle of my asp page where I include another ASP
page. I want to determine from the query string (I already have a query
string parsing function) which asp file I want to include. My problem is,
that after the --> in my include everything becomes plain text. Here's an
example of the code:

if QueryString("cond") = "CONDITION1"
	{
		document.write ("<!-- #Include File='include1.asp' -->");
	}
else if QueryString("cond") = "CONDITION2"
	{
		document.write ("<!-- #Include File='include2.asp' -->");

	}

Beware the wrap.

TIA,
Howard
_______________________________________________
Javascript mailing list
Javascript at LaTech.edu 
http://www.LaTech.edu/mailman/listinfo/javascript




More information about the Javascript mailing list