Forums
This topic is locked
js navbar in dreamweaver 7.0
Posted 15 Nov 2005 22:46:03
1
has voted
15 Nov 2005 22:46:03 david jones posted:
I have a navbar that useses javascript. I would like to set it up in dreamweaver. like a js snippet or template but do not know how. The origanal navbar was wrote using tables and no css. I converted it over to dis and css. I would like to add the origanal tables version and the divs version so I can add it to a webpage as I am building.<pre id=code><font face=courier size=2 id=code>
<!--
//This code contains all the image swap functions.
if (document.images)
{
offtools = new Image(49 ,18);
offtools.src = " images/tools-tnav.gif";
ontools = new Image(63 ,18);
ontools.src = "images/tools-tnav2.gif";
offtutorials = new Image(50 ,19);
offtutorials.src = " images/guides-tnav.gif";
ontutorials = new Image(50 ,19);
ontutorials.src = "images/guides-tnav2.gif";
offtemplates = new Image(51 ,20);
offtemplates.src = " images/templates-tnav.gif";
ontemplates = new Image(51 ,20);
ontemplates.src = "images/templates-tnav2.gif";
offresources = new Image(52 ,21);
offresources.src = " images/resources-tnav.gif";
onresources = new Image(52 ,21);
onresources.src = "images/resources-tnav2.gif";
offresume = new Image(52 ,21);
offresume.src = " images/resume.gif";
onresume = new Image(52 ,21);
onresume.src = "images/resume2.gif";
offcontact = new Image(52 ,21);
offcontact.src = " images/contact.gif";
oncontact = new Image(52 ,21);
oncontact.src = "images/contact2.gif";
offhome = new Image(52 ,21);
offhome.src = " images/home-tnavon.gif";
onhome = new Image(52 ,21);
onhome.src = "images/home-tnavon2.gif";
offtoolsleft = new Image(52 ,21);
offtoolsleft.src = " images/tools-tnavleft.gif";
ontoolsleft = new Image(52 ,21);
ontoolsleft.src = "images/tools-tnavleft2.gif";
offhomeleft = new Image(52 ,21);
offhomeleft.src = " images/home-tnavonleft.gif";
onhomeleft = new Image(52 ,21);
onhomeleft.src = "images/home-tnavonleft2.gif";
offtutorialsleft = new Image(50 ,19);
offtutorialsleft.src = " images/guides-tnavleft.gif";
ontutorialsleft = new Image(50 ,19);
ontutorialsleft.src = "images/guides-tnavleft2.gif";
offtemplatesleft = new Image(51 ,20);
offtemplatesleft.src = " images/templates-tnavleft.gif";
ontemplatesleft = new Image(51 ,20);
ontemplatesleft.src = "images/templates-tnavleft2.gif";
offresourcesleft = new Image(52 ,21);
offresourcesleft.src = " images/resources-tnavleft.gif";
onresourcesleft = new Image(52 ,21);
onresourcesleft.src = "images/resources-tnavleft2.gif";
offresumeleft = new Image(52 ,21);
offresumeleft.src = " images/resumeleft.gif";
onresumeleft = new Image(52 ,21);
onresumeleft.src = "images/resumeleft2.gif";
offmenu = new Image(52 ,21);
offmenu.src = " images/leftmenu.gif";
onmenu = new Image(52 ,21);
onmenu.src = "images/leftmenuon.gif";
offjscode = new Image(53 ,21);
offjscode.src = " images/rightmenu.gif";
onjscode = new Image(53 ,21);
onjscode.src = "images/rightmenuon.gif";
offjscodeselected = new Image(53 ,21);
offjscodeselected.src = " images/rightmenuselected.gif";
onjscodeselected = new Image(53 ,21);
onjscodeselected.src = "images/rightmenuselectedon.gif";
offmenuselected = new Image(53 ,21);
offmenuselected.src = " images/leftmenuselected.gif";
onmenuselected = new Image(53 ,21);
onmenuselected.src = "images/leftmenuselectedon.gif";
}
function di(id,action)
{
if (document.images)
{
document.images[id].src=eval(action + id +".src"
}
}
function di2(id,action)
{
if (document.images)
{
document.images[id].src=eval(action + id +".src"
}
}
//Image swap functions ends here.
function close_window()
{
window.close();
}
</font id=code></pre id=code>
here is the table version of the navbar.
<pre id=code><font face=courier size=2 id=code>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>Yoursite.com</TITLE>
<META content="text/html; charset=utf-8" http-equiv=content-type>
<META content="" name=author>
<META content="" name=keywords>
<META content="" name=description>
<META content=all name=robots>
<SCRIPT LANGUAGE=JavaScript SRC="mysite_files/images/changeimage.js" type="text/javascript" /></SCRIPT>
<STYLE media=all type=text/css>@import url( mysite_files/style.css );
</STYLE>
<META content="MSHTML 5.00.3700.6699" name=GENERATOR></HEAD>
<BODY>
<DIV id=logo></DIV>
<TABLE align=center cellPadding=0 cellSpacing=0 class=navbkg id=tlnk-tbl
width="100%" summary="">
<TBODY>
<TR>
<TD align=right><IMG alt="fading image" height=22
src="mysite_files/topleft.jpg" width=189 TD <>
<TD width=80><A
href="file:///C:/Documents%20and%20Settings/dvdljns/My%20Documents/Yoursite_com_files/mysite.htm"
title=Home><IMG alt=Home border=0 height=23
src="mysite_files/home-tnav.gif" width=80></A></TD>
<TD width=90><A
href="file:///C:/Documents%20and%20Settings/dvdljns/My%20Documents/Yoursite_com_files/filler.htm"
onmouseout="di2('tools','off')" onmouseover="di2('tools','on')"
title=services><IMG alt=Services border=0 id=tools
src="mysite_files/tools-tnav.gif"></A></TD>
<TD width=90><A
href="file:///C:/Documents%20and%20Settings/dvdljns/My%20Documents/Yoursite_com_files/filler.htm"
onmouseout="di2('tutorials','off')" onmouseover="di2('tutorials','on')"
title=tutorials><IMG alt=Tutorials border=0 id=tutorials
src="mysite_files/guides-tnav.gif"></A></TD>
<TD width=90><A
href="file:///C:/Documents%20and%20Settings/dvdljns/My%20Documents/Yoursite_com_files/filler.htm"
onmouseout="di2('templates','off')" onmouseover="di2('templates','on')"
title=templates><IMG alt=Templates border=0 id=templates
src="mysite_files/templates-tnav.gif"></A></TD>
<TD width=90><A
href="file:///C:/Documents%20and%20Settings/dvdljns/My%20Documents/Yoursite_com_files/filler.htm"
onmouseout="di2('resources','off')" onmouseover="di2('resources','on')"
title=resources><IMG alt=Resources border=0 id=resources
src="mysite_files/resources-tnav.gif"></A></TD>
<TD width=90><A
href="file:///C:/Documents%20and%20Settings/dvdljns/My%20Documents/Yoursite_com_files/filler.htm"
onmouseout="di2('resume','off')" onmouseover="di2('resume','on')"
title=resume><IMG alt="Online Tools" border=0 id=resume
src="mysite_files/resume.gif"></A></TD>
<TD width=90><A
href="file:///C:/Documents%20and%20Settings/dvdljns/My%20Documents/Yoursite_com_files/filler.htm"
onmouseout="di2('contact','off')" onmouseover="di2('contact','on')"
title=contact><IMG alt=Contact border=0 id=contact
src="mysite_files/contact.gif"></A></TD>
<TD align=left><IMG alt=spacer height=23 src="mysite_files/topright.jpg"
TD <></TD></TR></TBODY></TABLE></BODY></HTML>
</font id=code></pre id=code>
It is probaly better to work with one at a time.
here is where I got it from.www.heaphydesigns.com/index.php