www.webdeveloper.com
Results 1 to 4 of 4

Thread: Issue with my links - relative paths?

  1. #1
    Join Date
    Dec 2006
    Posts
    143

    Issue with my links - relative paths?

    Hi,

    i have just been passed on to finish of a website for somebody. Right now, i am trying to add html links to some of the drop down navigation menus. The drop-down i am currently working on is called 'Applicants' with the following undearneath:

    Information for Applicants
    Training courses
    Enrolment Information
    Benefits of Working
    ..

    here is html code snippet of what i have done so far:

    Code:
    <div id="menu">
        <ul class="dropdown">
                <li><a href="index.html">Home</a></li>
                <li><a class="current">Applicants</a>
                    <ul class="sub_menu">
                          <li><a href="applicants.html">Information for Applicants</a></li>
                         <li><a href="./applicants_fld/training-courses.html">Training Courses</a></li>
                         <li><a href="./applicants_fld/enrolment-info.html">Enrolment Information</a></li>
                         <li><a href="#">Benefits of Working</a></li>
                         <li><a href="#">Improving Career Prospects</a></li>
                         <li><a href="#">Career Advice</a></li>
                         <li><a href="#">Success Stories</a></li>
                    </ul>
                </li>
     
    ...
    When i load my webpage(index.html) up and click on the 'Applicants' menu button i get directed to the applicants.html page. After i have done this and begin clicking each link 1 by 1, i am able click on the links, however, when i get down to 'Enrolment Information' and click it, i get an error message:

    The requested URL /Free2Learn/Free2learn_Website_Version_1/applicants/enrolment-info.html was not found on this server.

    However, it seems that instead of having 'applicants_fld' in it's file path, it has 'applicants'.

    Secondly, after seeing this error, when i hit the back button and click the 'Training Courses' link, i also get the same error, but for the new file:


    The requested URL /Free2Learn/Free2learn_Website_Version_1/applicants/training-courses.html was not found on this server.



    Here is the file path:

    C:\wamp\www\Free2Learn\Free2learn_Website_Version_1\applicants_fld

    file structure:
    www\Free2Learn - flder
    Free2learn_Website_Version_1 - folder
    -> applicants.html
    -> index.html

    applicants_fld -folder
    -> training-courses.html
    -> enrolment-info

    Code:
    <div id="menu">
        <ul class="dropdown">
                <li><a class="current">Home</a></li>
                <li><a href="applicants.html">Applicants</a>
                    <ul class="sub_menu">
                         <li><a href="applicants.html">Information for Applicants</a></li>
                         <li><a href="./applicants_fld/training-courses.html">Training Courses</a></li>
                         <li><a href="./applicants_fld/enrolment-info.html">Enrolment Information</a></li>
                         <li><a href="./applicants_fld/benefit-of-work.html">Benefits of Working</a></li>
                         <li><a href="./applicants_fld/improve-career-prospects.html">Improving Career Prospects</a></li>
                         <li><a href="./applicants_fld/career-advice.html">Career Advice</a></li>
                         <li><a href="./applicants_fld/success-stories.html">Success Stories</a></li>
                    </ul>
                </li>
    Please can somebody tell me why i get the error on when i click on my enrolment link and why that everytime i go back, i get the same error for another link? This seems to happen often and could be to do with my path.


    I did try to change the paths but no change. I also removed my underscores but no affect
    Please help

  2. #2
    Join Date
    Aug 2006
    Posts
    1,934
    You might post the full code for one of the pages like training-courses.html. There are two potential problems. First, somthing is linking you into a directory called /applicants and you show no references to it. It's somewhere in your code that we can't see. Secondly, if the code you posted is what's in each of those source files (aside from index.html) then you're referencing a directory called /applicants_fld from inside the folder applicants_fld, which I bet doesn't exist. Is the code you're showing for your navigation copied as is into each html file, or is it tweaked for each one?

    Dave

  3. #3
    Join Date
    Dec 2006
    Posts
    143
    tracknut, thanks for the reply, the code for index.html and a copy of the full code of training file is bellow. Well the code that i'm showing is pretty much the same for each html file BUT when a user clicks under the navigation links under 'Applicants' menu, it is meant to show a different piece of content.

    Here is a link to show you the way the menus are dune:
    http://img816.imageshack.us/img816/3...linksissue.jpg

    index.html snippet
    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
     
    <link rel="stylesheet" type="text/css" media="screen" href="css/control.css"/>
    <link rel="icon" href="images/Free2learn-favicon2.ico" type="images">
    
     
    
    </head>
    <body>
    <div id="wrapper">
    <div id="header">
    			<ul id="breadcrumbs-nav">
                    <li><a href="accessibility.html">Accessibility</a></li>
                    <li><a href="site=map.html">Site Map</a></li>
     		 		<li><a href="jobs.html">Jobs</a></li>
      				<li class="last"><a href="contact-us.html">Find US</a></li>
    			</ul>
    	<p><a href="index.html"><img src="images/logos/Logo.png"  alt="Free2learn Logo" /></a></p>
    	<div id="search">
    		   <form action="http://www.free2learn.eu/Search-Result.html" id="cse-search-box">
    <div>
        				   <input type="hidden" name="cx" value="007197844040554752670:6x2nidux6ve" />
         <!--end number -->
        
      </div><!--end header-->
    
      <div id="main-container">
      <div id="menu">
    	<ul class="dropdown">
            	<li><a class="current">Home</a></li>
            	<li><a href="applicants.html">Applicants</a>
            		<ul class="sub_menu">
            			 <li><a href="applicants.html">Information for Applicants</a></li>
            			 <li><a href="./applicants_fld/training-courses.html">Training Courses</a></li>
            			 <li><a href="./applicants_fld/enrolment-info.html">Enrolment Information</a></li>
            			 <li><a href="./applicants_fld/benefit-of-work.html">Benefits of Working</a></li>
            			 <li><a href="./applicants_fld/improve-career-prospects.html">Improving Career Prospects</a></li>
            			 <li><a href="./applicants_fld/career-advice.html">Career Advice</a></li>
            			 <li><a href="./applicants_fld/success-stories.html">Success Stories</a></li>
            		</ul>
            	</li>
            	<li><a href="#">Employers</a>
            		<ul class="sub_menu">
            			 <li><a href="#">Information for Employers</a></li>
            			 <li><a href="#">Training Courses</a></li>
            			 <li><a href="#">Enrolment Information</a></li>
            		</ul>
            	</li>
    
    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Applicants - Free2Learn LTD</title>
    
    
    <link rel="stylesheet" type="text/css" media="screen" href="css/control.css"/>
    <link rel="stylesheet" type="text/css" href="css/applicants.css"/>
    <link rel="icon" href="images/Free2learn-favicon2.ico" type="images">
    
    <script type="text/javascript" src="js/jquery-1.3.1.min.js"></script>	
    <script type="text/javascript" language="javascript" src="js/jquery.dropdownPlain.js"></script>
    
    
    </head>
    <body>
    <div id="wrapper">
      <div id="header">
    			<ul id="breadcrumbs-nav">
                    <li><a href="accessibility.html">Accessibility</a></li>
                    <li><a href="site=map.html">Site Map</a></li>
     		 		<li><a href="jobs.html">Jobs</a></li>
      				<li class="last"><a href="contact-us.html">Find US</a></li>
    			</ul>
    	<p><a href="index.html"><img src="images/logos/Logo.png"  alt="Free2learn Logo" /></a></p>
    	<div id="search">
    		   <form action="http://www.free2learn.eu/Search-Result.html" id="cse-search-box">
    <div>
        				   <input type="hidden" name="cx" value="007197844040554752670:6x2nidux6ve" />
        				   <input type="hidden" name="cof" value="FORID:10" />
        				   <input type="hidden" name="ie" value="UTF-8" />
        				   <input type="text" name="q" size="20" />
        				   <input type="submit" name="sa" value="Search" />
    		     </div>
    	      </form>
    				      <script type="text/javascript" src=""></script>
        </div><!-- end search div -->
    	<div class="tel-number"><img src="images/telephone_number.png" alt="Free2learn Phone Number 0208 525 9430"/></div>
        <!--end number -->
      </div><!--end header-->
    <div id="main-container_applicant">
    <div id="top-page">
    <p><img class="right" src="images/training_courses_picture_tag.jpg" width="632" height="264" alt="Training Courses image title" /></p>
    <div id="menu">
    	<ul class="dropdown">
            	<li><a href="index.html">Home</a></li>
            	<li><a class="current">Applicants</a>
            		<ul class="sub_menu">
            			  <li><a href="applicants.html">Information for Applicants</a></li>
            			 <li><a href="./applicants_fld/training-courses.html">Training Courses</a></li>
            			 <li><a href="./applicants_fld/enrolment-info.html">Enrolment Information</a></li>
            			 <li><a href="./applicants_fld/benefit-of-work.html">Benefits of Working</a></li>
            			 <li><a href="#">Improving Career Prospects</a></li>
            			 <li><a href="#">Career Advice</a></li>
            			 <li><a href="#">Success Stories</a></li>
            		</ul>
            	</li>
            	<li><a href="#">Employers</a>
            		<ul class="sub_menu">
            			 <li><a href="#">Information for Employers</a></li>
            			 <li><a href="#">Training Courses</a></li>
            			 <li><a href="#">Enrolment Information</a></li>
            		</ul>
            	</li>
            			
            	<li><a href="#">Partners</a>
            		<ul class="sub_menu">
            			 <li><a href="#">Information for Partners</a></li>
            			 <li><a href="#">Training Courses</a></li>
            			 <li><a href="#">Enrolment Information</a></li>
            		</ul>
            	</li>
            	<li><a href="#">About us</a></li>
                <li><a href="#">Contact us</a></li>
            </ul>
       </div>
    <ul id="local_navigation">
    
    <li><a class="current">Information for Applicants</a></li>
    <li><a href="applicants/training-courses.html">Training Courses</a></li>
    <li><a href="#">Enrolment Information </a></li>
    <li><a href="#">Benefits of Working </a></li>
    <li><a href="#">Improving Career Prospects</a></li>
    <li><a href="#">Career Advice</a></li>
    <li><a href="#">Success Stories</a></li>
    
    </ul>
    
    </div><!--end top page-->
    
    
    
    <div id="applicants-title">
    <div class="applicants-left">
    <h1>Information for Applicants</h1>
    </div>
    
    <div class="applicants-content">
      <p>People are different and so are  the jobs that suit them. Thatís why we offer a variety of possible training  courses targeting different industries, so that you can find the training that  best matches your preferences and abilities. </p>
      <p>All of our courses are taught by  professionals with years of experience, and were specifically designed to  address the latest developments in each industry. They are guaranteed to give  you a head start and prepare you for work in the best possible way.</p>
    </div>
    
    
    
    </div><!--end applicants content-->
    </div><!--end main container applicants -->
    <ul id="logos">
      		<li class="first"><a href="#" title="Matrix"><img src="images/logos/Matrix.jpg" width="166" height="80" alt="Matrix logo" /></a></li>
      		<li class="two"><a href="http://www.direct.gov.uk/en/DisabledPeople/Employmentsupport/LookingForWork/DG_4000314" target="_blank" alt="Positive about Disabled People Logo" title="Positive about 		Disabled People Logo" >
      		<img src="images/logos/people_logo.jpg" width="100" height="81" alt="Positive disable people logo" /></a></li>
    <li class="three"><a href="http://www.rec.uk.com/home" target="_blank" alt="REC Website" title="REC Website" >
    <img src="images/logos/REC.jpg" width="69" height="70" alt="Rec Logo" /></a></li>
      		<li class="four"><a href="http://www.bis.gov.uk/" target="_blank" alt="BIS Website" title="BIS Website" >
      		<img src="images/logos/BIS-logo-STK_RGB.jpg" width="110" height="60" alt="Bis logo" /></a></li>
      		<li class="five"><a href="http://www.ediplc.com/" target="_blank" alt="EDI Website" title="EDI Website" >
      		<img src="images/logos/edilogo.jpg" width="100" height="53" alt="EDI logo" /></a></li>
    	<li class="six"><a href="https://skillspledge.broadsystem.com/" target="_blank" alt="Skills pledge Website" title="Skills pleage Website">
        <img src="images/logos/skills-b.jpg" width="95" height="95" alt="The skills pledge Logo"/></a></li>
      </ul>
    
      <div id="footer">
    		<ul id="footer-nav">
      			<li><a href="index.html">Home</a></li>
      			<li><a href="applicants.html">Applicants</a></li>
      			<li><a href="employers.html">Employers</a></li>
      			<li><a href="partners.html">Partners</a></li>
     			<li><a href="about-us.html">About us</a></li>
      			<li><a href="contact-us.html">Contact us</a></li>
      			<li>© Copyright 2010: Free2Learn Ltd</li>
    		</ul><!-- end addall-logo --><!-- end addall-logo -->
      </div><!--end footer-->
    
    </div> <!--end wrapper -->
    
    
    </body>
    </html>
    The folder applicants_fld does actually exist, but it just seems to referrence /applicants/ instead of applicants_fld.

    Please note that the website has been passed so i'm just trying to finish what my friend started, so if i have mistakenly missed something out, please accept my apologise.

  4. #4
    Join Date
    Aug 2006
    Posts
    1,934
    I haven't waded thru the entire file, but here's a piece of code from your applicants.html file:

    Code:
    <ul id="local_navigation">
    
    <li><a class="current">Information for Applicants</a></li>
    <li><a href="applicants/training-courses.html">Training Courses</a></li>
    <li><a href="#">Enrolment Information </a></li>
    <li><a href="#">Benefits of Working </a></li>
    <li><a href="#">Improving Career Prospects</a></li>
    <li><a href="#">Career Advice</a></li>
    <li><a href="#">Success Stories</a></li>
    
    </ul>
    I've noted the reference to the directory "applicants" which apparently doesn't exist, and a set of other links which will go nowhere. Perhaps that's what you're looking to fix?

    Dave

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles