Ik ben nu bezig om een menu aan het maken voor mijn site, ik wil daarbij gebruik maken van een extern javascript.
Weet iemand hoe je het voor elkaar kunt krijgen bij de volgende broncode :
<html>
<head>
<title>menu</title>
<style>
.BorderOn { width: 95px;
margin-left:15px;
border:1px solid #000000 }
.BorderOff { width: 95px;
margin-left:0px;
border:1px solid #000000 }
</style>
<script language="JavaScript">
function boxOn(which) {
if (document.all||document.getElementById) {
which.className = 'BorderOn'; } }
function boxOff(which) {
if (document.all||document.getElementById) {
which.className = 'BorderOff'; } }
</script>
</head>
<table cellpadding="0" cellspacing="0" width="150"> <tr> <td align="center">
<table cellpadding="3" cellspacing="0" bgcolor="ffffff" class="BorderOff">
<tr> <td> <font color="#000000" size="2" face="Arial"><b>Menu<b></font> </td> </tr> </table>
<table cellpadding="3" cellspacing="0" class="BorderOff" onMouseover="boxOn(this)" onMouseout="boxOff(this)">
<tr> <td> <a href=".html">
[img]".gif"[/img]
<font color="#000000" size="2" face="Arial"> Home</font></a> </td> </tr> </table>
<table cellpadding="3" cellspacing="0" class="BorderOff" onMouseover="boxOn(this)" onMouseout="boxOff(this)">
<tr> <td> <a href=".html">
[img]".gif"[/img]
<font color="#000000" size="2" face="Arial"> Links</font></a> </td> </tr> </table>
Het script deel in dit topic moet als extern js gebruikt worden, als ik alles zoals het nu staat in een html file zet doet hij het gewoon, maar als het script deel in een .js file komt werkt het niet.
Weet iemand hiet de oplossing voor.
Weet iemand hoe je het voor elkaar kunt krijgen bij de volgende broncode :
<html>
<head>
<title>menu</title>
<style>
.BorderOn { width: 95px;
margin-left:15px;
border:1px solid #000000 }
.BorderOff { width: 95px;
margin-left:0px;
border:1px solid #000000 }
</style>
<script language="JavaScript">
function boxOn(which) {
if (document.all||document.getElementById) {
which.className = 'BorderOn'; } }
function boxOff(which) {
if (document.all||document.getElementById) {
which.className = 'BorderOff'; } }
</script>
</head>
<table cellpadding="0" cellspacing="0" width="150"> <tr> <td align="center">
<table cellpadding="3" cellspacing="0" bgcolor="ffffff" class="BorderOff">
<tr> <td> <font color="#000000" size="2" face="Arial"><b>Menu<b></font> </td> </tr> </table>
<table cellpadding="3" cellspacing="0" class="BorderOff" onMouseover="boxOn(this)" onMouseout="boxOff(this)">
<tr> <td> <a href=".html">
[img]".gif"[/img]
<font color="#000000" size="2" face="Arial"> Home</font></a> </td> </tr> </table>
<table cellpadding="3" cellspacing="0" class="BorderOff" onMouseover="boxOn(this)" onMouseout="boxOff(this)">
<tr> <td> <a href=".html">
[img]".gif"[/img]
<font color="#000000" size="2" face="Arial"> Links</font></a> </td> </tr> </table>
Het script deel in dit topic moet als extern js gebruikt worden, als ik alles zoals het nu staat in een html file zet doet hij het gewoon, maar als het script deel in een .js file komt werkt het niet.
Weet iemand hiet de oplossing voor.