Get ready for BLACK FRIDAY shopping starting in

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>

&lt;!--
//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>
&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"&gt;
&lt;HTML&gt;&lt;HEAD&gt;&lt;TITLE&gt;Yoursite.com&lt;/TITLE&gt;
&lt;META content="text/html; charset=utf-8" http-equiv=content-type&gt;
&lt;META content="" name=author&gt;
&lt;META content="" name=keywords&gt;
&lt;META content="" name=description&gt;
&lt;META content=all name=robots&gt;
&lt;SCRIPT LANGUAGE=JavaScript SRC="mysite_files/images/changeimage.js" type="text/javascript" /&gt;&lt;/SCRIPT&gt;
&lt;STYLE media=all type=text/css&gt;@import url( mysite_files/style.css );
&lt;/STYLE&gt;
&lt;META content="MSHTML 5.00.3700.6699" name=GENERATOR&gt;&lt;/HEAD&gt;
&lt;BODY&gt;
&lt;DIV id=logo&gt;&lt;/DIV&gt;
&lt;TABLE align=center cellPadding=0 cellSpacing=0 class=navbkg id=tlnk-tbl
width="100%" summary=""&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD align=right&gt;&lt;IMG alt="fading image" height=22
src="mysite_files/topleft.jpg" width=189 TD &lt;&gt;
&lt;TD width=80&gt;&lt;A
href="file:///C:/Documents%20and%20Settings/dvdljns/My%20Documents/Yoursite_com_files/mysite.htm"
title=Home&gt;&lt;IMG alt=Home border=0 height=23
src="mysite_files/home-tnav.gif" width=80&gt;&lt;/A&gt;&lt;/TD&gt;
&lt;TD width=90&gt;&lt;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&gt;&lt;IMG alt=Services border=0 id=tools
src="mysite_files/tools-tnav.gif"&gt;&lt;/A&gt;&lt;/TD&gt;
&lt;TD width=90&gt;&lt;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&gt;&lt;IMG alt=Tutorials border=0 id=tutorials
src="mysite_files/guides-tnav.gif"&gt;&lt;/A&gt;&lt;/TD&gt;
&lt;TD width=90&gt;&lt;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&gt;&lt;IMG alt=Templates border=0 id=templates
src="mysite_files/templates-tnav.gif"&gt;&lt;/A&gt;&lt;/TD&gt;
&lt;TD width=90&gt;&lt;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&gt;&lt;IMG alt=Resources border=0 id=resources
src="mysite_files/resources-tnav.gif"&gt;&lt;/A&gt;&lt;/TD&gt;
&lt;TD width=90&gt;&lt;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&gt;&lt;IMG alt="Online Tools" border=0 id=resume
src="mysite_files/resume.gif"&gt;&lt;/A&gt;&lt;/TD&gt;
&lt;TD width=90&gt;&lt;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&gt;&lt;IMG alt=Contact border=0 id=contact
src="mysite_files/contact.gif"&gt;&lt;/A&gt;&lt;/TD&gt;
&lt;TD align=left&gt;&lt;IMG alt=spacer height=23 src="mysite_files/topright.jpg"
TD &lt;&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BODY&gt;&lt;/HTML&gt;

</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

Reply to this topic