473,382 Members | 1,648 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

how to find website root path

Hello,

I have a problem with an application i'm working on (Asp.net using
vb.net for developing). I'm normally used to doing middle tier
development, so my javascript skills are not up to par. Here is my problem:

I have a javascript file called 'PMP/Scripts/Popups.js' (pmp is the root
of the website). In that file is the following function:

function OpenTutorial(sTutID)
{
var sURL = '../support/tutorials.aspx?tutid=' = sTutID;
var sProperties = 'center:yes;etc..';
window.showModalDialog(sURL, self, sProperties);
}

where ../support is acutally pmp/support.

Most of the website pages are located in sub folders from the root of
the website. When editing is to be done on a record, a popup window is
called from the main page. the popup pages are in another sub folder
(i.e. pmp/review would be where review.aspx resides and the edit page
would be located at pmp/review/popups). We give the user a tutorial
icon to click on which calls the OpenTutorial function on a button click
event.

The problem is the tutorial popup page won't load properly when called
from another popup page. I've tried variations of location.href,
location.pathname, location.hostname etc.. but can't seem to get the
pages to open correctly. The most common error i get is that the url is
not correct. here is a sample of the urls being called by the function:

pmp/review/support/tutorials.aspx
pmp/feedback/support/tutorials.aspx
pmp/thirdparty/support/tutorials.aspx.

Any suggestions on how i can get the function to point to
pmp/support/tutorials.aspx regardless of where the function is being
called from?

Thanks in advance
Shawn McNiven

Jul 23 '05 #1
1 15902
Shawn McNiven wrote on 13 mrt 2005 in comp.lang.javascript:
Any suggestions on how i can get the function to point to
pmp/support/tutorials.aspx regardless of where the function is being
called from?


/pmp/support/tutorials.aspx
--
Evertjan.
The Netherlands.
(Replace all crosses with dots in my emailaddress)

Jul 23 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: hokieghal99 | last post by:
import os, string print " " setpath = raw_input("Enter the path: ") def find_replace(setpath): for root, dirs, files in os.walk(setpath): fname = files for fname in files: find =...
5
by: Jonathan | last post by:
I am creating a CD-ROM based website template. Things work fine under Windows but when I try to run the site under Linux the path is messed up. Therefore my JavaScript functions misinterpret the...
2
by: Shimon Sim | last post by:
I have web project that includes few sits that must share some pictures. The project has following structure Root - just a folder with solution files - this is on IIS regular folder Site 1 - web...
3
by: gogaz | last post by:
Hi, I know query in Subject line "Could not find a part of the path" has been replied before lots of time, but mine is bit different. My web server is windows 2003 R2 with both .net framework...
3
by: Alan Cohen | last post by:
This seems like a really, really dumb question, but I can't seem to find the simple answer that it seems to deserve. My C#/ASP.net 2.0 app needs to email a URL link back to the site from a web...
0
by: sndive | last post by:
I have a weid problem. If i do this: import elementtree.ElementTree as ET .... tree = ET.parse("whatever") root = tree.getroot() r = root.find('last') print r return root where last is not an...
8
by: inFocus | last post by:
Hello, I am new to python and wanted to write something for myself where after inputing two words it would search entire drive and when finding both names in files name would either copy or move...
7
by: Richard | last post by:
"Jerry Stuckle" <jstucklex@attglobal.netwrote in message news:gashet$jcb$1@registered.motzarella.org... ...... Jerry, please read the question before replying. It is not his programming....
2
by: Sven Reuter | last post by:
Puzzled wrote: I hope I'll understand it in the right way. You browse your website http://www.example.com with a webbrowser. In the source of it is written by PHP <img...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.