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

Need help on URL syntax

Status
Not open for further replies.

FancyPrairie

Programmer
Oct 16, 2001
2,917
US
I'm testing so code on my local machine. I have setup IIS so my root is C:\inetpub\ After this follows the root structure we have at work. I have the following several folders.

c:\inetpub\c:\inetpub\c:\inetpub\c:\inetpub\c:\inetpub\
The folder TestHTML contains my html page (HTMLPage1.htm)
Within HTMLPage1 I want to include files that reside in the includefiles subfolder. So I assume my syntax would be:
<select src="../lib/Library1/includefiles/file1.js.....
<select src="../lib/Library2/includefiles/file2.js.....

There exists a file in the includefiles subfolder of Library1 that adds include files at runtime to HTMLPage1.htm. Would the syntax be the same?
 
I'm testing so code on my local machine.  I have setup IIS so my root is C:\inetpub\ this follows the root structure we have at work.  I have the following several folders.

c:\inetpub\c:\inetpub\c:\inetpub\c:\inetpub\c:\inetpub\
The folder TestHTML contains my html page (HTMLPage1.htm)
Within HTMLPage1 I want to include files that reside in the includefiles subfolder.  So I assume my syntax would be:
<select src="../lib/Library1/includefiles/file1.js.....
<select src="../lib/Library2/includefiles/file2.js.....
You assume wrong. The select element is used to create drop downs, not include other files.

If you want to include JS files, you may want to use the script tag instead.
Code:
<script type="text/JavaScript" src="path/to/js/file.js"></script>

 

----------------------------------
Phil AKA Vacunita
----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.

Web & Tech
 
I'm sorry. Have had little sleep. My post should have read:
<script src="../lib/Library1/includefiles/file1.js.....
<script src="../lib/Library2/includefiles/file2.js.....

not <select src="...

I guess I'm unclear on defining URL's. All include files are loaded correctly if I launch my page like this: c:\inetpub\. But some files don't get included if I launch it like this:
HTMLPage1.html includes files like this:
<script src="../Lib/Library1/IncludeFiles/filename.js

The javascript file (which resides in c:\inetpub\ includes other files at runtime using the same syntax ('../Lib/Library1/IncludeFiles/filename.js')

So, why does the syntax I'm using work when I launch my page one way and not the other?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top