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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Looking for Calling Directory.. 1

Status
Not open for further replies.

Elliott3

Programmer
Sep 5, 2002
347
CA
Hi,
Inside an html file I have:
<!--#exec cgi="/cgi-bin/myPage.asp" -->
at the start of this page I need to check for the directory that it was called from... ie the directory that the html document is in... but when I use
Request.ServerVariables("SCRIPT_NAME") I get the directory of myPage.asp...

Any ideas what can be done here?

CES
 

If I understand correctly:
Server.MapPth(".") will display directory of page that is using myPage.asp
 
I am getting the directory of the .asp instead of the .html page that is executed within...

any idea why?

CES
 
In the html file it is like this:
<html>
code...
<!--#exec cgi="/cgi-bin/myPage.asp" -->
code...
</html>

i am looking to to get the directory of the html document instead of the .asp file.. is that a little more clear maybe.
 
I really thought you might have had it here, but no such luck... it still the directory of the asp file...

Could it maybe be a server setting??

Just to recap.... I have this html file and when you browse to it through the internet, it executes an asp file in the following line:
Code:
<!--#exec cgi="/cgi-bin/myPage.asp" -->
The above line is in a plain html file(note: the asp file is in a different directory than the html file)... while executing the myPage.asp file I need to find out the directory that the html file is in...

I have tried many things but am all ears to any suggestions at all...

Note: The site is currently on an NT box and is being moved to windows 2003... on the NT box, the statement:
Code:
Request.ServerVariables("SCRIPT_NAME")

will return the directory of the html file(which is what i want, but will not on the new box)?? that is why I thought it might be a server config setting??

any thoughts.. at all.. ill try anything lol

CES

 
perchance, on the exec call, add to the .asp an argument of caller?

<!--#exec cgi="/cgi-bin/myPage.asp?refpage=blah.html" -->
 
Thanks for the thought DreXor... I was thinking of doing that but the site I am working on is fairly large and I would like to find an alternate way...

I can't believe the headache this has been!!

Any other suggestions?

CES
 
lol .. you could cheat.... enable ASP on html extentions, and set a session("currentpage") at the top of each before the exec request

but that might be a little outlandish.....
 
I appreciate the suggestion, but its still a bit much... thanks for thinking though, you never know, i might end up without a choice...

Though somone must have had this problem before

CES
 
migrational issues tend to vary, perchance have you rummaged in msdn.microsoft.com just in case there's a migrational Qfile ?
 
I have been rumaging around in there but to no avail...

thinking maybe its server setup... is there a forum that I should maybe check for that?

CES
 
Thanks... I'll give it a shot over there... thanks for the suggestions!!

CES
 
I wonder if it would change anything if I did enable asp on html extensions? How do I go about doing that?

CES
 
go into the web site properties in IIS, go to i thin kit's extentions, then edit ASP so you can copy the allowed attribs and the DLL location, then cancel from ASP then go to HTML and alter it's specs to match ASP

 
my apologies, was trying to guide from memory, you go to default web site properties, then press the config button down by application name, then the rest of the information is the same
 
Thanks for the ideas!! What I ended up doing was enableing ASP on html extensions(I never knew you could do that!) Then I changed the way the file was included so its now a basic include instead of an execute...

<!--#include virtual="/cgi-bin/myPage.asp" -->

I'm calling it a night tonight... that was one of the two issues I have to fix on this site(that I did not write originally! lol)

On to the next tomorrow..

Thanks again to all suggestions, they proved very helpfull!!

CES
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top