Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Path name variable problems

Status
Not open for further replies.

calista

Programmer
Jan 24, 2001
545
US
This is driving me crazy! X-) I can't seem to get the Application.Path variables to work right. It seems like no matter what I do, sometimes they work, sometimes they don't. It all depends on what page you start from. I can access a given page from one level, and it works fine. If I try to access the same page from a level deeper, it doesn't. Actually, what I am doing is printing my page header and footer using CFINCLUDE and it's the graphics that don't print. The reason I am doing it that way instead of in Application.cfm and OnRequestEnd.cfm, is that I am using frames, and I don't want the header and footer in the menu page. Any suggestions or advice more than welcome!

Thanks, guys!

Calista :)
 
P.S. Here are my variable names:
Code:
<CFSET application.RootPath=&quot;../../Intranet/&quot;>
<CFSET application.CommonPath=&quot;#Application.RootPath#CommonFiles/&quot;>
<CFSET application.ImagePath=&quot;#Application.CommonPath#Images/&quot;> 
<CFSET application.LogoPath=&quot;#Application.ImagePath#Logos/&quot;>
If there's a way to put my header and footer in Application.cfm and OnRequestEnd.cfm and not have them print on my Menu page, that would be fine, too.

Thanks!
 
Hey, Calista. You may want to check out the onBeforePrint attribute. What it does is let you define what page elements are visible to the printer and what elements are hidden. Run this code, look at it on the screen, then print it out and note the difference:
Code:
<HTML>
<HEAD>
<TITLE></TITLE>
<STYLE TYPE=&quot;text/css&quot;>
.removeforprint
{
	font-color=&quot;Navy&quot;
}
</STYLE>

<SCRIPT LANGUAGE=&quot;JavaScript&quot;>
function printHandler()
{
	document.styleSheets[0].addRule(&quot;.removeforprint&quot;, &quot;display:none;&quot;);	
}

function afterPrint()
{
	document.styleSheets[0].addRule(&quot;.removeforprint&quot;, &quot;display:inline;&quot;);
}

window.onafterprint  = afterPrint
window.onbeforeprint = printHandler 
</SCRIPT>
</HEAD>

<BODY>
Calista, this stuff will print.<BR>
<DIV CLASS=&quot;removeforprint&quot;>
   This stuff will not.<BR>
</DIV>

But it will all be visible on the screen.  Give it a try.
</BODY>
</HTML>
 [b]Kevin[/b]
slanek@ssd.fsi.com
 
Sorry for the confusion. I didn't ask the right question. It's the screen display I am trying to fix. Calista,
Jedi Knight
Champion of the Force
 
I got it! I had put a &quot;/&quot; after my path name variable(which, of course, had the trailing &quot;/&quot; in it) on that one link, so I wound up with an extra &quot;/&quot; in the link. (Ooppps! :~/) Oh well, it works, now. It seems the big problems are easier to figure out. It's the tiny ones that'll kill ya! Just thought I'd let you know. Calista,
Jedi Knight
Champion of the Force
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top