Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > Slashes in file names

Reply
Thread Tools

Slashes in file names

 
 
tshad
Guest
Posts: n/a
 
      03-01-2005
"David Dorward" <(E-Mail Removed)> wrote in message
news:d02mdi$hjd$2$(E-Mail Removed)...
> tshad wrote:
>
>>> Nope. You still use "/" here. Any time you use a slash within HTML
>>> code[1], it should be a forward slash.

>
>> But that still doesn't find the root directory (at least, I can't seem to
>> make it work).

>
> It should find the root directory, of course if you are accessing it over
> your local file system then the root is c:\ (or whatever drive it is). You
> are usually best off installing a local webserver
> <http://httpd.apache.org/> for testing if you want to use root relative
> URIs.


I am running on my local machine at the moment with IIS on it. View source
gives me:

************************************************** *************************
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Strict//EN">
<script language="javascript" src="/includes/ypSlideOutMenus.js"></script>
<script language="javascript">

var menus = [new ypSlideOutMenu("menu1", "down", 220, 112, 190, 300)]

for (var i = 0; i < menus.length; i++) {
menus[i].onactivate = new Function("document.getElementById('act" + i +
"').className='active';");
menus[i].ondeactivate = new Function("document.getElementById('act" + i
+ "').className='';");
}
ypSlideOutMenu.writeCSS();
</script>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Home Page</title>
<link href="/css/staffing.css" rel="stylesheet" type="text/css">
</head>
<body>
************************************************** *************************
Neither the script line finds the .js file nor the link line finding the
staffing.css.

The URL would be something like http://localhost/development/staff (where
the .aspx file is).

Development is the root (virtual directory) and under that is
css,includes,staff etc.

Tom

>
> --
> David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
> Home is where the ~/.bashrc is



 
Reply With Quote
 
 
 
 
tshad
Guest
Posts: n/a
 
      03-01-2005

"Dan" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) oups.com...
>
> tshad wrote:
>> What about if I want it to be relative to the root folder (not c:,

> but the
>> virtual directory root)?
>>
>> Something like:
>>
>> <script language="javascript" src="\includes\Menus.js"></script>

>
> URLs always use forward slashes. Even "file:" URLs referring to local
> system files use forward slashes even though the local operating system
> convention might use backslashes.
>
> For relative URLs to the root, you would use
> src="/includes/Menus.js".


I tried that (just posted the view source) and it doesn't seem to work.

Here it is again:
************************************************** ************
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Strict//EN">
<script language="javascript" src="/includes/ypSlideOutMenus.js"></script>
<script language="javascript">

var menus = [new ypSlideOutMenu("menu1", "down", 220, 112, 190, 300)]
for (var i = 0; i < menus.length; i++) {
menus[i].onactivate = new Function("document.getElementById('act" + i +
"').className='active';");
menus[i].ondeactivate = new Function("document.getElementById('act" + i
+ "').className='';");
}
ypSlideOutMenu.writeCSS();
</script>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Home Page</title>
<link href="/css/staffing.css" rel="stylesheet" type="text/css">
</head>
<body>
************************************************** *****************

2 lines are set up that way, neither seem to find it:

<script language="javascript" src="/includes/ypSlideOutMenus.js"></script>
and
<link href="/css/staffing.css" rel="stylesheet" type="text/css">

Am I missing something?

Tom
>
> --
> Dan
>



 
Reply With Quote
 
 
 
 
tshad
Guest
Posts: n/a
 
      03-01-2005

"tshad" <(E-Mail Removed)> wrote in message
news:B85Vd.10462$(E-Mail Removed) om...
> "David Dorward" <(E-Mail Removed)> wrote in message
> news:d02mdi$hjd$2$(E-Mail Removed)...
>> tshad wrote:
>>
>>>> Nope. You still use "/" here. Any time you use a slash within HTML
>>>> code[1], it should be a forward slash.

>>
>>> But that still doesn't find the root directory (at least, I can't seem
>>> to
>>> make it work).

>>
>> It should find the root directory, of course if you are accessing it over
>> your local file system then the root is c:\ (or whatever drive it is).
>> You
>> are usually best off installing a local webserver
>> <http://httpd.apache.org/> for testing if you want to use root relative
>> URIs.

>
> I am running on my local machine at the moment with IIS on it. View
> source gives me:
>
> ************************************************** *************************
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Strict//EN">
> <script language="javascript" src="/includes/ypSlideOutMenus.js"></script>
> <script language="javascript">
>
> var menus = [new ypSlideOutMenu("menu1", "down", 220, 112, 190, 300)]
>
> for (var i = 0; i < menus.length; i++) {
> menus[i].onactivate = new Function("document.getElementById('act" + i +
> "').className='active';");
> menus[i].ondeactivate = new Function("document.getElementById('act" + i
> + "').className='';");
> }
> ypSlideOutMenu.writeCSS();
> </script>
> <html>
> <head>
> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
> <title>Home Page</title>
> <link href="/css/staffing.css" rel="stylesheet" type="text/css">
> </head>
> <body>
> ************************************************** *************************
> Neither the script line finds the .js file nor the link line finding the
> staffing.css.
>
> The URL would be something like http://localhost/development/staff (where
> the .aspx file is).
>
> Development is the root (virtual directory) and under that is
> css,includes,staff etc.
>


I think I figured it out. Just not sure why.

If I change http://localhost/development/staff to
http://10.0.0.5/development/staff it works fine. For some reason, it has a
problem with localhost.

Tom
> Tom
>
>>
>> --
>> David Dorward <http://blog.dorward.me.uk/>
>> <http://dorward.me.uk/>
>> Home is where the ~/.bashrc is

>
>



 
Reply With Quote
 
tshad
Guest
Posts: n/a
 
      03-01-2005
"tshad" <(E-Mail Removed)> wrote in message
news:Xa5Vd.10463$(E-Mail Removed) om...
>
> "Dan" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed) oups.com...
>>
>> tshad wrote:
>>> What about if I want it to be relative to the root folder (not c:,

>> but the
>>> virtual directory root)?
>>>
>>> Something like:
>>>
>>> <script language="javascript" src="\includes\Menus.js"></script>

>>
>> URLs always use forward slashes. Even "file:" URLs referring to local
>> system files use forward slashes even though the local operating system
>> convention might use backslashes.
>>
>> For relative URLs to the root, you would use
>> src="/includes/Menus.js".

>
> I tried that (just posted the view source) and it doesn't seem to work.
>
> Here it is again:
> ************************************************** ************
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Strict//EN">
> <script language="javascript" src="/includes/ypSlideOutMenus.js"></script>
> <script language="javascript">
>
> var menus = [new ypSlideOutMenu("menu1", "down", 220, 112, 190, 300)]
> for (var i = 0; i < menus.length; i++) {
> menus[i].onactivate = new Function("document.getElementById('act" + i +
> "').className='active';");
> menus[i].ondeactivate = new Function("document.getElementById('act" + i
> + "').className='';");
> }
> ypSlideOutMenu.writeCSS();
> </script>
> <html>
> <head>
> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
> <title>Home Page</title>
> <link href="/css/staffing.css" rel="stylesheet" type="text/css">
> </head>
> <body>
> ************************************************** *****************
>
> 2 lines are set up that way, neither seem to find it:
>
> <script language="javascript" src="/includes/ypSlideOutMenus.js"></script>
> and
> <link href="/css/staffing.css" rel="stylesheet" type="text/css">
>
> Am I missing something?
>

I posted this also in my other post:

I think I figured it out. Just not sure why.

If I change http://localhost/development/staff to
http://10.0.0.5/development/staff it works fine. For some reason, it has a
problem with localhost.

Tom

> Tom
>>
>> --
>> Dan
>>

>
>



 
Reply With Quote
 
David Dorward
Guest
Posts: n/a
 
      03-01-2005
tshad wrote:

>>> But that still doesn't find the root directory (at least, I can't seem
>>> to make it work).


>> It should find the root directory, of course if you are accessing it over


> <script language="javascript" src="/includes/ypSlideOutMenus.js"></script>


> Neither the script line finds the .js file nor the link line finding the
> staffing.css.
>
> The URL would be something like http://localhost/development/staff (where
> the .aspx file is).


What happens if you point your browser directly at
http://localhost/includes/ypSlideOutMenus.js?

--
David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
Home is where the ~/.bashrc is
 
Reply With Quote
 
tshad
Guest
Posts: n/a
 
      03-01-2005

"tshad" <(E-Mail Removed)> wrote in message
news:qg5Vd.10465$(E-Mail Removed) om...
>
> "tshad" <(E-Mail Removed)> wrote in message
> news:B85Vd.10462$(E-Mail Removed) om...
>> "David Dorward" <(E-Mail Removed)> wrote in message
>> news:d02mdi$hjd$2$(E-Mail Removed)...
>>> tshad wrote:
>>>
>>>>> Nope. You still use "/" here. Any time you use a slash within HTML
>>>>> code[1], it should be a forward slash.
>>>
>>>> But that still doesn't find the root directory (at least, I can't seem
>>>> to
>>>> make it work).
>>>
>>> It should find the root directory, of course if you are accessing it
>>> over
>>> your local file system then the root is c:\ (or whatever drive it is).
>>> You
>>> are usually best off installing a local webserver
>>> <http://httpd.apache.org/> for testing if you want to use root relative
>>> URIs.

>>
>> I am running on my local machine at the moment with IIS on it. View
>> source gives me:
>>
>> ************************************************** *************************
>> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Strict//EN">
>> <script language="javascript"
>> src="/includes/ypSlideOutMenus.js"></script>
>> <script language="javascript">
>>
>> var menus = [new ypSlideOutMenu("menu1", "down", 220, 112, 190, 300)]
>>
>> for (var i = 0; i < menus.length; i++) {
>> menus[i].onactivate = new Function("document.getElementById('act" + i
>> + "').className='active';");
>> menus[i].ondeactivate = new Function("document.getElementById('act" +
>> i + "').className='';");
>> }
>> ypSlideOutMenu.writeCSS();
>> </script>
>> <html>
>> <head>
>> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
>> <title>Home Page</title>
>> <link href="/css/staffing.css" rel="stylesheet" type="text/css">
>> </head>
>> <body>
>> ************************************************** *************************
>> Neither the script line finds the .js file nor the link line finding the
>> staffing.css.
>>
>> The URL would be something like http://localhost/development/staff (where
>> the .aspx file is).
>>
>> Development is the root (virtual directory) and under that is
>> css,includes,staff etc.
>>

>
> I think I figured it out. Just not sure why.
>
> If I change http://localhost/development/staff to
> http://10.0.0.5/development/staff it works fine. For some reason, it has
> a problem with localhost.
>

My mistake - 10.0.0.5 still didn't work.

Tom
> Tom
>> Tom
>>
>>>
>>> --
>>> David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
>>> Home is where the ~/.bashrc is

>>
>>

>
>



 
Reply With Quote
 
tshad
Guest
Posts: n/a
 
      03-01-2005

"tshad" <(E-Mail Removed)> wrote in message
news:Vg5Vd.10466$(E-Mail Removed) om...
> "tshad" <(E-Mail Removed)> wrote in message
> news:Xa5Vd.10463$(E-Mail Removed) om...
>>
>> "Dan" <(E-Mail Removed)> wrote in message
>> news:(E-Mail Removed) oups.com...
>>>
>>> tshad wrote:
>>>> What about if I want it to be relative to the root folder (not c:,
>>> but the
>>>> virtual directory root)?
>>>>
>>>> Something like:
>>>>
>>>> <script language="javascript" src="\includes\Menus.js"></script>
>>>
>>> URLs always use forward slashes. Even "file:" URLs referring to local
>>> system files use forward slashes even though the local operating system
>>> convention might use backslashes.
>>>
>>> For relative URLs to the root, you would use
>>> src="/includes/Menus.js".

>>
>> I tried that (just posted the view source) and it doesn't seem to work.
>>
>> Here it is again:
>> ************************************************** ************
>> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Strict//EN">
>> <script language="javascript"
>> src="/includes/ypSlideOutMenus.js"></script>
>> <script language="javascript">
>>
>> var menus = [new ypSlideOutMenu("menu1", "down", 220, 112, 190, 300)]
>> for (var i = 0; i < menus.length; i++) {
>> menus[i].onactivate = new Function("document.getElementById('act" + i
>> + "').className='active';");
>> menus[i].ondeactivate = new Function("document.getElementById('act" +
>> i + "').className='';");
>> }
>> ypSlideOutMenu.writeCSS();
>> </script>
>> <html>
>> <head>
>> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
>> <title>Home Page</title>
>> <link href="/css/staffing.css" rel="stylesheet" type="text/css">
>> </head>
>> <body>
>> ************************************************** *****************
>>
>> 2 lines are set up that way, neither seem to find it:
>>
>> <script language="javascript"
>> src="/includes/ypSlideOutMenus.js"></script>
>> and
>> <link href="/css/staffing.css" rel="stylesheet" type="text/css">
>>
>> Am I missing something?
>>

> I posted this also in my other post:
>
> I think I figured it out. Just not sure why.
>
> If I change http://localhost/development/staff to
> http://10.0.0.5/development/staff it works fine. For some reason, it has
> a problem with localhost.
>

My mistake - 10.0.0.5 still didn't work.

Tom
> Tom
>
>> Tom
>>>
>>> --
>>> Dan
>>>

>>
>>

>
>



 
Reply With Quote
 
tshad
Guest
Posts: n/a
 
      03-01-2005

"David Dorward" <(E-Mail Removed)> wrote in message
news:d02nh6$bp6$1$(E-Mail Removed)...
> tshad wrote:
>
>>>> But that still doesn't find the root directory (at least, I can't seem
>>>> to make it work).

>
>>> It should find the root directory, of course if you are accessing it
>>> over

>
>> <script language="javascript"
>> src="/includes/ypSlideOutMenus.js"></script>

>
>> Neither the script line finds the .js file nor the link line finding the
>> staffing.css.
>>
>> The URL would be something like http://localhost/development/staff (where
>> the .aspx file is).

>
> What happens if you point your browser directly at
> http://localhost/includes/ypSlideOutMenus.js?


If I do that, I get Page not found. If I do
http://localhost/development/include...ideOutMenus.js - it findes it fine

Tom

>
> --
> David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
> Home is where the ~/.bashrc is



 
Reply With Quote
 
David Dorward
Guest
Posts: n/a
 
      03-01-2005
tshad wrote:

>> What happens if you point your browser directly at
>> http://localhost/includes/ypSlideOutMenus.js?


> If I do that, I get Page not found. If I do
> http://localhost/development/include...ideOutMenus.js - it findes it
> fine


That is your problem then. You are telling it to look from the root of the
server, not from /development/.

--
David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
Home is where the ~/.bashrc is
 
Reply With Quote
 
JDS
Guest
Posts: n/a
 
      03-01-2005
On Tue, 01 Mar 2005 21:46:44 +0000, tshad wrote:

> If I do that, I get Page not found. If I do
> http://localhost/development/include...ideOutMenus.js - it findes it
> fine
>
> Tom



Problem solved, then. Put "development" in the path in your HTML files.

<script language="javascript"
src="/development/includes/ypSlideOutMenus.js"></script>

--
JDS | http://www.velocityreviews.com/forums/(E-Mail Removed)lid
| http://www.newtnotes.com
DJMBS | http://newtnotes.com/doctor-jeff-master-brainsurgeon/

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
RegEx: odd number of slashes? and too many slashes? Dan Wilkin Perl Misc 1 07-17-2006 03:47 AM
radeditor/dataset/slashes/System.Data.DBConcurrencyException Henrik de Jong ASP .Net 0 06-18-2004 01:20 PM
FAQ: slashes in your filenames??? Julie C++ 10 04-13-2004 02:33 PM
String replacement( 2 slashes-> 4 slashes ) qazmlp Java 5 04-07-2004 10:26 PM
Using slashes as querystring Nils N ASP .Net 2 02-08-2004 09:37 PM



Advertisments