Jump to content

Left Navigation Menu Not Functioning Properly - Css Issue?


ready2drum

Recommended Posts

I replaced a banner .jpg graphic on the home page of the website yesterday, and now this morning, the left navigation menu bar is acting strange in that when I click on the first menu item, and then click on the second left nav menu item, I get an error stating that Page Cannot Be Displayed. Also, I noticed that I'm clicking on the different left navigation menu items, the path in the URL field is not correct. For example, when I click on the Safety menu item and then click on the Forms menu item, I see this in the address bar: http://mywebsite.com/intranet/safety/safety/safety.php. Has anyone ever encountered this type of weird situation and if so, what can I do to resolve it so that it's working properly?See the code below for details...as I've spent alot of time trying to fix the problem. I've even tried adding the '../' in front of the .php files listed in the left navigation menu items where it shows the <a href="../index.php> but all that did was break the images in the left nav menu bar and in some cases cause the links to the menu items to break.I really could use some help on this one.Thanks!!!Frustrated and hungry

<link href="../application.css" rel="stylesheet" type="text/css" /><div id="menu">	<div class="fstyle_1" id="menu_item"><a href="index.php">Home</a></div>	<div class="fstyle_1" id="menu_item"><a href="mgm/mgm.php">MGM</a></div>	<div class="fstyle_1" id="menu_item"><a href="safety/safety.php">Safety</a></div>	<div class="fstyle_1" id="menu_item"><a href="news_info/news_info.php">News & Info.</a></div>		<div class="fstyle_1" id="menu_item"><a href="departments.php">Departments</a></div>	<div class="fstyle_1" id="menu_item"><a href="reports.php">Reports</a></div>	<div class="fstyle_1" id="menu_item"><a href="directory.php">Directory</a></div>	<div class="fstyle_1" id="menu_item"><a href="forms.php">Forms</a></div>	<div class="fstyle_1" id="menu_item"><a href="policies.php">Policies</a></div>	<div class="fstyle_1" id="menu_item"><a href="site_admin/site_admin.php">Site Admin</a></div>	  <form id="form1" name="form1" method="post" action="../j_share/j_share_doc_results.php">	      <input name="query" type="text" class="fstyle_5" id="query" size="8" />	      <input type="image" src="flash/arrow.jpg" width="15" height="15" ALT="submit"/>	      <br />	      <span class="fstyle_1">Search J:\Share\ </span>	</form>	<div class="fstyle_1" id="menu_item"><a href="http://news.srv.mywebsite.com/story.asp?newsID=8170"><img src="flash/index_menu.jpg" width="100" height="414" /></a></div>	</div>

Link to comment
Share on other sites

when I click on the first menu item, and then click on the second left nav menu item
If you have clicked on the first item, does that mean you are now in a different location, but using the same nav-bar? If I understand, you are looking for a single chunk of code that will work no matter what page it is on? In that case, you cannot use relative pathnames. Using ../ might work for some, but not for others, depending on whether the current page is in a directory or not.I don't really know what your file tree looks like, but I'm going to suggest putting a forward slash in front of all your paths. That will give them an absolute reference beginning with your root directory. Something like: href="/mgm/mgm.php">That assumes that index.php is in your root directory and that a directory called "mgm" is also in the root directory.
Link to comment
Share on other sites

If you have clicked on the first item, does that mean you are now in a different location, but using the same nav-bar? If I understand, you are looking for a single chunk of code that will work no matter what page it is on? In that case, you cannot use relative pathnames. Using ../ might work for some, but not for others, depending on whether the current page is in a directory or not.I don't really know what your file tree looks like, but I'm going to suggest putting a forward slash in front of all your paths. That will give them an absolute reference beginning with your root directory. Something like: href="/mgm/mgm.php">That assumes that index.php is in your root directory and that a directory called "mgm" is also in the root directory.
anything that is deeper than x:\wwwroot\inetpub\intranet\ it causes the left navigation menu to generate an error ' page cannot be found ' or else if it's the first menu item selected, the banner image is broken.I tried adding the '/' in front of the left nav menu items that are one sub-directory deep (mgm/mgm.php, safety/safety.php, news_info/news_info.php, and site_admin/site_admin.php) and still the problem exists.any suggestions? fyi.. I even deleted the divs that contained the banner graphic and the problem still exists.
Link to comment
Share on other sites

Can you post a live link?If not, maybe a clearer sense of your file tree?I personally don't do windows servers, so maybe someone else could straighten out a path issue here? :)
Since I can't provide a live link, I provided the code with as much explanation as possible...I hope someone can help to resolve this issue.The relative path doesn't seem to be updating whenever I click on more than one menu item link...if I click on the menu items that have a subdirectory below the root 'intranet' directory, the page cannot be displayed. I start out with w:\inetpub\wwwroot\intranet\index.php, then it goes to w:\inetpub\wwwroot\intranet\mgm\mgm.php, then if I click on a different menu item, the path is wrong as it will show something like w:\inetpub\wwwroot\intranet\mgm\news_info\news_info.php....(somehow the URL doesn't let go of the 'mgm' directory (or whichever the first menu item clicked happens to be.Hope this makes sense to someone out there!
Link to comment
Share on other sites

Can you post a live link?If not, maybe a clearer sense of your file tree?I personally don't do windows servers, so maybe someone else could straighten out a path issue here? :)
Since I can't provide a live link, I provided the code with as much explanation as possible...I hope someone can help to resolve this issue.The relative path doesn't seem to be updating whenever I click on more than one menu item link...if I click on the menu items that have a subdirectory below the root 'intranet' directory, the page cannot be displayed. I start out with w:\inetpub\wwwroot\intranet\index.php, then it goes to w:\inetpub\wwwroot\intranet\mgm\mgm.php, then if I click on a different menu item, the path is wrong as it will show something like w:\inetpub\wwwroot\intranet\mgm\news_info\news_info.php....(somehow the URL doesn't let go of the 'mgm' directory (or whichever the first menu item clicked happens to be.Hope this makes sense to someone out there!
Link to comment
Share on other sites

I resolved the issue by using absolute links instead of relative links...seems like no one else has ever had this problem before...not sure what caused the problem to begin with, so we'll never really know...when in doubt, use the full path for links on your website and don't spend any great amount of time trying to understand computer behavior, it's an enigma half the time...lol

Link to comment
Share on other sites

I resolved the issue by using absolute links instead of relative links...
That's exactly what DD told you to do...
If you have clicked on the first item, does that mean you are now in a different location, but using the same nav-bar? If I understand, you are looking for a single chunk of code that will work no matter what page it is on? In that case, you cannot use relative pathnames. Using ../ might work for some, but not for others, depending on whether the current page is in a directory or not.I don't really know what your file tree looks like, but I'm going to suggest putting a forward slash in front of all your paths. That will give them an absolute reference beginning with your root directory. Something like: href="/mgm/mgm.php">That assumes that index.php is in your root directory and that a directory called "mgm" is also in the root directory.
The forward slashes make it an absolute reference. If you have a file in w:\inetpub\wwwroot\intranet\ all you need is /filename.php to reference the file. But if it's in w:\inetpub\wwwroot\intranet\mgm\news_info\ you will need to have the full path to the file (minus all the stuff before your root folder) like this: /mgm/news_info/filename.phpDoes that make a little more sense?
Link to comment
Share on other sites

That's exactly what DD told you to do...The forward slashes make it an absolute reference. If you have a file in w:\inetpub\wwwroot\intranet\ all you need is /filename.php to reference the file. But if it's in w:\inetpub\wwwroot\intranet\mgm\news_info\ you will need to have the full path to the file (minus all the stuff before your root folder) like this: /mgm/news_info/filename.phpDoes that make a little more sense?
Yes, it does make sense....I appreciate you clearing that up for me. I realize that DD mentioned to use the absolute reference in his post, but when I had tried it, for some strange reason it wasn't working. I guess I got frustrated in trying to figure out why it still wouldn't work. I apologize for that. Thanks for your help and to DD for the feedback! If I run into any other issues, I'll be sure to seek the Forum again for direction.Thanks everyone!!
Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...