CodeCharge Studio
search Register Login  

Visual PHP Web Development

Visually Create Internationalized Web Applications, Web Reports, Calendars, and more.
CodeCharge.com

YesSoftware Forums -> CodeCharge -> Programming

 include file in ASP

Print topic Send  topic

Author Message
Jeannine
Posted: 02/12/2004, 6:10 AM

I am trying to include a file at a particular spot on my HTML page. The good news is that I *almost* have it working. Here is what I am doing:

1) Global module called include_file(Filename). You pass it the path and nameof the file to be included and it returns a string that holds the file (uses an ASP FSO to get the file info)

2) Then, basically setvar a variable to this string

worked perfactly *except* the output is converting the curly brace characted in my file to &123; thus generating a javascript error (the included file has javascript in it). If I refresh the page, the error goes away.

I tried this both as using setvar and as simply creating a new field (Label type, HTML checked). Same problem.

Ideas?
Nicole

Posts: 586
Posted: 02/17/2004, 2:52 AM

Jeannine,
It appears that CC SetVar function replacing curl braces with { and } respectively:
  
Function SetVar(sName, sValue)  
  if ParsedBlocks.Exists(sName) then  
    ParsedBlocks(sName) = replace(replace(sValue, "{", "{"), "}", "}")  
  else  
    ParsedBlocks.add sName, replace(replace(sValue, "{", "{"), "}", "}")  
  end if  
(BTW, I see that some code is converted in output, so please check Template.asp for exact code)
so as you need to add something without escaping you can try this code
  
ParsedBlocks(sName) = sValue  

Please keep in mind that as long as CC template variables also are framed using braces you'd better do not use the following symbols in template variable names:
" ;:=(".
Without these chars the text in {} will be considered as template variable.

_________________
Regards,
Nicole
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

PHP Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.