Stevo
05-08-2004, 11:55 AM
Okay, I have a CSS/javascript menu and I want the links to target an iframe called "iframe" instead of loading the pages in the main window. Here's the code I'm using:
<script language = "javascript">
<!--
function LmOver(elem, clr)
{elem.style.backgroundColor = clr;
elem.children.tags('A')[0].style.color = "#CCCCCC";
elem.style.cursor = 'hand'}
function LmOut(elem, clr)
{elem.style.backgroundColor = clr;
elem.children.tags('A')[0].style.color = "#CCCCCC";}
function LmDown(elem, clr)
{elem.style.backgroundColor = clr;
elem.children.tags('A')[0].style.color = "#CCCCCC";}
function LmUp(path)
{location.href = path;}
//-->
</script>
<table border="0" width="120" bgcolor="#000033" cellspacing="0" cellpadding="0">
<tr><td width="100%">
<table border="0" width="100%" cellspacing="1" cellpadding="1">
<tr><td width="100%" onMouseover="LmOver(this, '#006633')" onMouseout="LmOut(this, '#003333')" onMouseDown="LmDown(this, '#006633')"
onMouseUp="LmUp('welcome.php')" bgcolor="#003333"><A HREF="welcome.php" Class="navlink"> Welcome</a></td></tr>
<tr><td width="100%" onMouseover="LmOver(this, '#006633')" onMouseout="LmOut(this, '#003333')" onMouseDown="LmDown(this, '#006633')"
onMouseUp="LmUp('news.php')" bgcolor="#003333"><A HREF="news.php" Class="navlink"> News</a></td></tr>
<tr><td width="100%" onMouseover="LmOver(this, '#006633')" onMouseout="LmOut(this, '#003333')" onMouseDown="LmDown(this, '#006633')"
onMouseUp="LmUp('rules.php')" bgcolor="#003333"><A HREF="rules.php" Class="navlink"> TVR Rules</a></td></tr>
<tr><td width="100%" onMouseover="LmOver(this, '#006633')" onMouseout="LmOut(this, '#003333')" onMouseDown="LmDown(this, '#006633')"
onMouseUp="LmUp('members.php')" bgcolor="#003333"><A HREF="members.php" Class="navlink"> TVR Members</a></td></tr>
<tr><td width="100%" onMouseover="LmOver(this, '#006633')" onMouseout="LmOut(this, '#003333')" onMouseDown="LmDown(this, '#006633')"
onMouseUp="LmUp('chapters.php')" bgcolor="#003333"><A HREF="chapters.php" Class="navlink"> Chapters</a></td></tr>
<tr><td width="100%" onMouseover="LmOver(this, '#006633')" onMouseout="LmOut(this, '#003333')" onMouseDown="LmDown(this, '#006633')"
onMouseUp="LmUp('links.php')" bgcolor="#003333"><A HREF="links.php" Class="navlink"> Links</a></td></tr>
<tr><td width="100%" onMouseover="LmOver(this, '#006633')" onMouseout="LmOut(this, '#003333')" onMouseDown="LmDown(this, '#006633')"
onMouseUp="LmUp('links.php')" bgcolor="#003333"><A HREF="http://www.tosw.net/modules.php?name=Forums&file=index&c=6" Class="navlink"> Forum</a></td></tr>
</table>
</td></tr>
</table>
Let me know if this is possible.
<script language = "javascript">
<!--
function LmOver(elem, clr)
{elem.style.backgroundColor = clr;
elem.children.tags('A')[0].style.color = "#CCCCCC";
elem.style.cursor = 'hand'}
function LmOut(elem, clr)
{elem.style.backgroundColor = clr;
elem.children.tags('A')[0].style.color = "#CCCCCC";}
function LmDown(elem, clr)
{elem.style.backgroundColor = clr;
elem.children.tags('A')[0].style.color = "#CCCCCC";}
function LmUp(path)
{location.href = path;}
//-->
</script>
<table border="0" width="120" bgcolor="#000033" cellspacing="0" cellpadding="0">
<tr><td width="100%">
<table border="0" width="100%" cellspacing="1" cellpadding="1">
<tr><td width="100%" onMouseover="LmOver(this, '#006633')" onMouseout="LmOut(this, '#003333')" onMouseDown="LmDown(this, '#006633')"
onMouseUp="LmUp('welcome.php')" bgcolor="#003333"><A HREF="welcome.php" Class="navlink"> Welcome</a></td></tr>
<tr><td width="100%" onMouseover="LmOver(this, '#006633')" onMouseout="LmOut(this, '#003333')" onMouseDown="LmDown(this, '#006633')"
onMouseUp="LmUp('news.php')" bgcolor="#003333"><A HREF="news.php" Class="navlink"> News</a></td></tr>
<tr><td width="100%" onMouseover="LmOver(this, '#006633')" onMouseout="LmOut(this, '#003333')" onMouseDown="LmDown(this, '#006633')"
onMouseUp="LmUp('rules.php')" bgcolor="#003333"><A HREF="rules.php" Class="navlink"> TVR Rules</a></td></tr>
<tr><td width="100%" onMouseover="LmOver(this, '#006633')" onMouseout="LmOut(this, '#003333')" onMouseDown="LmDown(this, '#006633')"
onMouseUp="LmUp('members.php')" bgcolor="#003333"><A HREF="members.php" Class="navlink"> TVR Members</a></td></tr>
<tr><td width="100%" onMouseover="LmOver(this, '#006633')" onMouseout="LmOut(this, '#003333')" onMouseDown="LmDown(this, '#006633')"
onMouseUp="LmUp('chapters.php')" bgcolor="#003333"><A HREF="chapters.php" Class="navlink"> Chapters</a></td></tr>
<tr><td width="100%" onMouseover="LmOver(this, '#006633')" onMouseout="LmOut(this, '#003333')" onMouseDown="LmDown(this, '#006633')"
onMouseUp="LmUp('links.php')" bgcolor="#003333"><A HREF="links.php" Class="navlink"> Links</a></td></tr>
<tr><td width="100%" onMouseover="LmOver(this, '#006633')" onMouseout="LmOut(this, '#003333')" onMouseDown="LmDown(this, '#006633')"
onMouseUp="LmUp('links.php')" bgcolor="#003333"><A HREF="http://www.tosw.net/modules.php?name=Forums&file=index&c=6" Class="navlink"> Forum</a></td></tr>
</table>
</td></tr>
</table>
Let me know if this is possible.