PDA

View Full Version : Problem Linking navbar drop downs


DreamweaverDan
03-19-2012, 09:33 AM
Hi guys,
I am making a website in dreamweaver for GCSE level, so I created a fine navigation bar in macromedia fireworks with several dropdowns. I was then linking the drop downs to other files in the same folder. For example one of the addresses was: file:///D:/School/ICT/ICT%20website/Unit%202/A02/3%20Revision%20German.html

But when I export it into dreamweaver and then preview it in google chrome, it says webpage is not found. and this is the addess I get
file:///E:/ICT%20website/Unit%202/A02/3%20Revision%20German.html

I did not do anything to the address. For one it cut some folders out (the school folder, the ICT folder) and also it changed from D: to E:
any idea what is going on here!! I am only year 11!

Thank You

Corrosive
03-19-2012, 09:47 AM
Hi Dan

Have you defined your website correctly? That may be a cause. Also, try and leave spaces out of file/page names. Break them up with - or _ so call your page 3-Revision-German.html

DreamweaverDan
03-19-2012, 09:59 AM
Define the website?? and i will try the no space thing, that answered that question, but why have some folder been cut out of the file path?

Corrosive
03-19-2012, 10:16 AM
Yes, you need to define your site before you start; http://www.dreamweaverclub.com/cs5-setup.php

DreamweaverDan
03-19-2012, 10:21 AM
i am not making it to go live on the internet, if thats what your getting at mate?

Corrosive
03-19-2012, 11:08 AM
No, I got that ;) If you define your website correctly then Dreamweaver will automatically make all your linking paths correct. You don't have to define a remote host but you should define your local folders where your website pages will be developed.

DreamweaverDan
03-19-2012, 01:26 PM
ok i defined the website, but now the navbar has no dropdowns when i imported the exported fireworks file!!! what is wrong today!!

Corrosive
03-19-2012, 02:15 PM
Can you show us the code for your page please Dan? Might be easier to debug what is happening.

DreamweaverDan
03-19-2012, 02:57 PM
where i find that... i dont do coding! bare with me guys i am only at gsce level

DreamweaverDan
03-19-2012, 03:00 PM
and, the navbar doesnt recognise all my webpages!

Corrosive
03-19-2012, 03:15 PM
Your code is what Dreamweaver has created for you. Select 'code view' and copy and paste it here. We might be able to help from there. Otherwise we are just guessing what might be wrong!

DreamweaverDan
03-19-2012, 03:21 PM
all of it... ok, this is my homepage


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
<style type="text/css" media="screen">



@import url("Navigation Bar.css");

@import url("Navigation Bar.css");

@import url("Navigation Bar.css");

@import url("Navigation Bar.css");

@import url("Navigation Bar.css");

@import url("Navigation Bar.css");

@import url("Navigation Bar.css");

@import url("Navigation Bar.css");

@import url("Navigation Bar.css");
#Layer1 {
position:absolute;
width:200px;
height:168px;
z-index:1;
left: 6px;
top: 150px;
}


#Layer2 {
position:absolute;
width:521px;
height:83px;
z-index:2;
left: 239px;
top: 13px;
}
body {
background-color: #000066;
}
#Layer3 {
position:absolute;
width:183px;
height:136px;
z-index:3;
left: 56px;
top: 14px;
}
#Layer4 {
position:absolute;
width:185px;
height:138px;
z-index:4;
left: 1082px;
top: 13px;
}
#Layer5 {
position:absolute;
width:200px;
height:115px;
z-index:5;
left: 36px;
top: 375px;
}
#Layer6 {
position:absolute;
width:200px;
height:115px;
z-index:5;
left: 8px;
top: 347px;
}
#Layer1 #Navigation Bar ul {
border-top-width: 0.5em;
border-right-width: 0.5em;
border-bottom-width: 0.5em;
border-left-width: 0.5em;
border-top-style: solid;
border-right-style: solid;
border-bottom-style: solid;
border-left-style: solid;
}
#Layer1 #Navigation Bar ul {
border: 0.5em solid #FFFFFF;
float: left;
padding-top: 0.2em;
padding-right: 1em;
padding-bottom: 0.2em;
padding-left: 1em;
background-color: #999999;
}
#Layer1 #Navigation Bar ul {
float: left;
}








#Layer7 {
position:absolute;
width:906px;
height:129px;
z-index:6;
left: 413px;
top: 320px;
}
.style2 {
font-family: "Arial Black";
color: #FF0000;
font-size: x-large;
}
#Layer8 {
position:absolute;
width:117px;
height:44px;
z-index:7;
left: 270px;
top: 350px;
}
#Layer9 {
position:absolute;
width:138px;
height:60px;
z-index:8;
left: 270px;
top: 425px;
}
#Layer10 {
position:absolute;
width:139px;
height:59px;
z-index:9;
left: 270px;
top: 507px;
}
#Layer11 {
position:absolute;
width:200px;
height:115px;
z-index:10;
left: 41px;
top: 153px;
}


#Layer12 {
position:absolute;
width:200px;
height:115px;
z-index:10;
left: 45px;
top: 154px;
}


#apDiv1 {
position:absolute;
width:200px;
height:115px;
z-index:10;
left: 163px;
top: 180px;
}td img {display: block;}
#apDiv2 {
position:absolute;
width:200px;
height:115px;
z-index:10;
left: 63px;
top: 170px;
}td img {display: block;}td img {display: block;}
</style>
<script language="JavaScript1.2" type="text/javascript" src="mm_css_menu.js">function mmLoadMenus() {
if (window.mm_menu_0316100102_0) return;
window.mm_menu_0316100102_0 = new Menu("root",186,30,"Times New Roman, Times, serif",24,"#ff0000","#ff0000","#000099","#0000cc","center","middle",3,0,1000,-5,7,true,true,true,0,true,true);
mm_menu_0316100102_0.addMenuItem("Staff&nbsp;Directory","location='file:///D:/School/ICT/ICT%20website/Unit%202/A02/5%20Contact%20Staff%20Directory.html'");
mm_menu_0316100102_0.addMenuItem("School&nbsp;Directory","location='file:///D:/School/ICT/ICT%20website/Unit%202/A02/5%20Contact%20School%20Directory.html'");
mm_menu_0316100102_0.fontWeight="bold";
mm_menu_0316100102_0.hideOnMouseOut=true;
mm_menu_0316100102_0.menuBorder=1;
mm_menu_0316100102_0.menuLiteBgColor='#ffffff';
mm_menu_0316100102_0.menuBorderBgColor='#555555';
mm_menu_0316100102_0.bgColor='#555555';
window.mm_menu_0316100043_1 = new Menu("root",98,30,"Times New Roman, Times, serif",24,"#ff0000","#ff0000","#000099","#0000cc","center","middle",3,0,1000,-5,7,true,true,true,0,true,true);
mm_menu_0316100043_1.addMenuItem("Login","location='file:///D:/School/ICT/ICT%20website/Unit%202/A02/4%20Member%20Login.html'");
mm_menu_0316100043_1.addMenuItem("Register","location='file:///D:/School/ICT/ICT%20website/Unit%202/A02/4%20Member%20Register.html'");
mm_menu_0316100043_1.fontWeight="bold";
mm_menu_0316100043_1.hideOnMouseOut=true;
mm_menu_0316100043_1.menuBorder=1;
mm_menu_0316100043_1.menuLiteBgColor='#ffffff';
mm_menu_0316100043_1.menuBorderBgColor='#555555';
mm_menu_0316100043_1.bgColor='#555555';
window.mm_menu_0316100027_2 = new Menu("root",96,30,"Times New Roman, Times, serif",24,"#ff0000","#ff0000","#000099","#0000cc","center","middle",3,0,1000,-5,7,true,true,true,0,true,true);
mm_menu_0316100027_2.addMenuItem("German","location='file:///D:/School/ICT/ICT%20website/Unit%202/A02/3%20Revision%20German.html'");
mm_menu_0316100027_2.addMenuItem("French","location='file:///D:/School/ICT/ICT%20website/Unit%202/A02/3%20Revision%20French.html'");
mm_menu_0316100027_2.fontWeight="bold";
mm_menu_0316100027_2.hideOnMouseOut=true;
mm_menu_0316100027_2.menuBorder=1;
mm_menu_0316100027_2.menuLiteBgColor='#ffffff';
mm_menu_0316100027_2.menuBorderBgColor='#555555';
mm_menu_0316100027_2.bgColor='#555555';
window.mm_menu_0316095946_0 = new Menu("root",195,30,"Times New Roman, Times, serif",24,"#ff0000","#ff0000","#000099","#0000cc","center","middle",3,0,1000,-5,7,true,true,true,0,true,true);
mm_menu_0316095946_0.addMenuItem("Parent&nbsp;Discussion","location='file:///D:/School/ICT/ICT%20website/Unit%202/A02/2-Forum-Parent-Discussion.html'");
mm_menu_0316095946_0.addMenuItem("Trip&nbsp;Updates","location='file:///D:/School/ICT/ICT%20website/Unit%202/A02/2-Forum-Trip-Updates.html'");
mm_menu_0316095946_0.addMenuItem("Off&nbsp;Topic","location='file:///D:/School/ICT/ICT%20website/Unit%202/A02/2-Forum-Off-Topic.html'");
mm_menu_0316095946_0.fontWeight="bold";
mm_menu_0316095946_0.hideOnMouseOut=true;
mm_menu_0316095946_0.menuBorder=1;
mm_menu_0316095946_0.menuLiteBgColor='#ffffff';
mm_menu_0316095946_0.menuBorderBgColor='#555555';
mm_menu_0316095946_0.bgColor='#555555';

mm_menu_0316095946_0.writeMenus();
} // mmLoadMenus()</script>
<script type="text/JavaScript">
<!--
function MM_swapImgRestore() { //v3.0
var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
function MM_displayStatusMsg(msgStr) { //v1.0
window.status=msgStr;
document.MM_returnValue = true;
}
//--><script language="JavaScript1.2" type="text/javascript" src="mm_menu.js"></script>
</head>

<body onload="MM_preloadImages('Buttons/Application Form/app form 2.png','Buttons/Register/register 2.png','Buttons/Frogserver/frogserver 2.png','Buttons/Feedback Form/feedback form2.png')">
<div id="apDiv2">
<script language="JavaScript1.2" type="text/javascript">mmLoadMenus();</script>
<script language="JavaScript1.2" type="text/javascript">mmLoadMenus();</script>
<img name="NavBar" src="NavBar.gif" width="1300" height="54" border="0" id="NavBar" usemap="#m_NavBar" alt="" />
<map name="m_NavBar" id="m_NavBar">
<area shape="rect" coords="1058,11,1253,45" href="#" alt="" onmouseout="MM_startTimeout();" onmouseover="MM_showMenu(window.mm_menu_0316100102_0,1060,62,nu ll,'NavBar');" />
<area shape="rect" coords="779,8,984,46" href="#" alt="" onmouseout="MM_startTimeout();" onmouseover="MM_showMenu(window.mm_menu_0316100043_1,825,60,nul l,'NavBar');" />
<area shape="rect" coords="515,6,710,49" href="#" alt="" onmouseout="MM_startTimeout();" onmouseover="MM_showMenu(window.mm_menu_0316100027_2,568,62,nul l,'NavBar');" />
<area shape="rect" coords="283,10,427,47" href="#" alt="" onmouseout="MM_startTimeout();" onmouseover="MM_showMenu(window.mm_menu_0316095946_0,266,58,nul l,'NavBar');MM_displayStatusMsg('Connect with people on our online forum...');return document.MM_returnValue" />
</map>
</div>
<div id="Layer2"><img src="Images/Homepage/Website Title.png" width="842" height="136" /></div>
<div id="Layer3"><img src="Images/Homepage/Flags.png" alt="d" width="182" height="134" /></div>
<div id="Layer4"><img src="Images/Homepage/Flags.png" width="182" height="134" /></div>
<div id="Layer6"> <img name="AdvertisingBanner" src="Advertising%20Banner.gif" width="260" height="300" border="0" id="AdvertisingBanner" alt="" /></div>
<div class="style2" id="Layer7">
<p>Hello parents, students and teachers! This website is a resource for the languages department. This website holds a forum to discuss various things to do with the MFL department of the Ridgeway School. Students can also check out the revision sites for french and german, located on the menu bar! </p>
<p>Anyone can sign up, it is free and easy!! So sign up now to apply for a languages trip. </p>
</div>
<div id="Layer9"><a href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image7','','Buttons/Register/register 2.png',1)"><img src="Buttons/Register/register 1.png" name="Image7" width="137" height="50" border="0" id="Image7" /></a></div>
<div id="Layer8"><a href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image9','','Buttons/Feedback Form/feedback form2.png',1)"><img src="Buttons/Feedback Form/feedback form1.png" name="Image9" width="137" height="50" border="0" id="Image9" /></a><a href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image9','','Buttons/Frogserver/frogserver 2.png',1)"></a><a href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image6','','Buttons/Application Form/app form 2.png',1)"></a></div>
<div id="Layer10"><a href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image8','','Buttons/Frogserver/frogserver 2.png',1)"><img src="Buttons/Frogserver/frogserver 1.png" name="Image8" width="137" height="50" border="0" id="Image8" /></a></div>
</body>
</html>

Corrosive
03-19-2012, 03:45 PM
OK, what has been created by the links is what we call absolute paths, so they include the path all the way back to your computer hard drive. I.e. file:///D:/

If you make your paths relative to the root folder of your website then you won't have this issue.

Your links would look more like;

location='Unit%202/A02/3%20Revision%20French.html'

This all boils back down to you defining your site correctly, which I mentioned earlier. If your root folder is defined then links can be relative to it and you would lose all those references to your hard drive, which is what is causing your problems.

DreamweaverDan
03-19-2012, 03:56 PM
i am working on a memory stick... all my site files are on my memory stick! and thank you mate really helpful

DreamweaverDan
03-19-2012, 04:03 PM
where you find the location thing?

Corrosive
03-19-2012, 04:05 PM
i am working on a memory stick... all my site files are on my memory stick! and thank you mate really helpful

Yes, but your memory stick can act as a root for your website as well. In fact anywhere you can create a folder can be a website root. It is just a bunch of files that link to each other and you can remove all references to drives etc by making links relative to the root folder.

And, you are welcome :)

Corrosive
03-19-2012, 04:05 PM
where you find the location thing?

In your site manager in Dreamweaver.

DreamweaverDan
03-19-2012, 04:21 PM
im using the memory stick temporarily, in a months time i gunna transfer back to computer, will i need to make any changes

Corrosive
03-19-2012, 04:32 PM
im using the memory stick temporarily, in a months time i gunna transfer back to computer, will i need to make any changes

No, because all your links will be relative to that folder. Just move the folder and, because the website is 'self-contained', it will all still work. For example, here is a menu bar from one of my websites;

<div id="navigation">
<ul>
<li><a href="pc-and-laptop-repairs.html" title="PC and Laptop Repairs" >PC & Laptop Repairs</a></li>
<li><a href="computer-installs-and-computer-upgrades.html" title="Installs and Upgrades" >Installs & Upgrades</a></li>
<li><a href="broadband-and-internet.html" title="Broadband and Internet" >Broadband & Internet</a></li>
<li><a href="home-network-and-home-server-installs.html" title="Home Network & Home Server Installs" >Home Networks</a></li>
<li class="last"><a href="audio-visual-equipment-installs.html" title="Audio Visual Installs" >Audio Visual Installs</a></li>
</ul>


</div><!--/navigation -->

See the paths don't reference the URL at all as they are relative to the website root.

DreamweaverDan
03-19-2012, 05:19 PM
a bit... but tbh i not that good with coding so i wont understand how to use it

domedia
03-19-2012, 05:33 PM
a bit... but tbh i not that good with coding so i wont understand how to use it

Yes you will. We all started out 'not that good with coding'. Setting up your site definitions requires little to no coding knowledge, so you're still in luck ;-)

moviemastersdk
04-12-2012, 06:17 AM
Nvm.




.
.
.
.
.
.

gigiloumill
05-03-2012, 11:58 AM
In DW, there's a button that says "code" on the top left hand side. (DW CS5). Click on it and it will reveal the code.