Wrox Programmer Forums
|
Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." NOT for ASP.NET 1.0, 1.1, or 2.0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 16th, 2008, 08:54 AM
Authorized User
 
Join Date: Sep 2006
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to misskaos99
Default access ASP pages in different folders

Can someone tell me how I can go back out a folder to access another page??
For instance:
im using iFRAMES and i have certain pages in certain folders.. as long as all pages are in the root.. thats fine.. i can go from the root of the main folder to a page in a subfolder.. but I cannot figure out how to go to a subfolder to the root or another folder... it keeps trying to find the page located in the folder I am already presently in..

Example:
Main folder Name:
Webapps

Main folder files:
login.asp, process.asp

Subfolder:
Webapps/Helpfiles

Subfolder files:
Webapps/Helpfiles/loginhelp.asp, Webapps/Helpfiles/processhelp.asp

<form name="test" action="login.asp">
If this form is on the webapps/helpfiles/loginhelp.asp page it will not go to Webapps/Login.asp it will search for Webapps/Helpfiles/login.asp...

and this does not work either:
<form name="test" action="webapps/login.asp">
If this form is on the webapps/helpfiles/loginhelp.asp page it will not go to Webapps/Login.asp it will search for Webapps/Helpfiles/webapps/login.asp...

Any suggestions?

THANKS IN ADVANCE FOR ALL OF YOUR HELP!


 
Old May 18th, 2008, 06:30 PM
Friend of Wrox
 
Join Date: Jan 2004
Posts: 1,870
Thanks: 12
Thanked 20 Times in 20 Posts
Send a message via AIM to mat41
Default

I use absolute URL's this would be my suggestion. I start with placing a constant called URLBase in a global file. EG:

1..create a file called global.asp, place this inside it (and and other useful things like database connection propeties etc....):
const URLBase = "http://localhost/Webapps/"

2..Include the file in all your pages

Now simply:
<form name="test" action="<%= URLBase %>login.asp">

Or you can enable parent paths and do something like (../ means go up a dir level):
<form name="test" action="../login.asp">

Wind is your friend
Matt
www.elitemarquees.com.au





Similar Threads
Thread Thread Starter Forum Replies Last Post
Copy files & Folders application in ASP.net rupakroy5 ASP.NET 1.0 and 1.1 Basics 0 May 8th, 2006 10:45 PM
Please Help! Ms Access Data Access Pages Iashia06 Access 0 May 4th, 2006 03:29 PM
How do I search TEXT in web folders and pages aatayyab PHP How-To 7 January 15th, 2006 01:08 PM
Modifying User Access Permissions to Folders (VB) gakhar Pro VB 6 0 April 14th, 2004 01:20 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.