ændre script til at bruge MySQL
jeg har dette script , men jeg ville kerne lave det om så det brugte MySQL til at hente menuen og teksten , er der en der kan det eller har løsningen med et andet script.her er det jeg har
<HEAD>
<SCRIPT LANGUAGE="JavaScript">
var linktext=new Array()
linktext[0]='<table border="0" width="210" height="185" bgcolor="#EFEFEF" cellpadding="8" cellspacing="0"><tr><td valign="top"><font face="arial" size="4"><b>This is really kind of amazing.</b></font></td></tr></table>'
linktext[1]='<table border="0" width="210" height="185" bgcolor="#D1FD80" cellpadding="8" cellspacing="0"><tr><td valign="top"><font face="arial" size="4"><b>You can have as many links as you wish.</b></font></td></tr></table>'
linktext[2]='<table border="0" width="210" height="185" bgcolor="#FDB9FD" cellpadding="8" cellspacing="0"><tr><td valign="top"><font face="arial" size="4"><b>This would be great to describe where the visitor is goin on your site.</b></font></td></tr></table>'
linktext[3]='<table border="0" width="210" height="185" bgcolor="#FFFF5E" cellpadding="8" cellspacing="0"><tr><td valign="top"><font face="arial" size="4"><b>Maybe the link is not too descriptive -- this should make it easier.</b></font></td></tr></table>'
linktext[4]='<table border="0" width="210" height="185" bgcolor="#C2D7FC" cellpadding="8" cellspacing="0"><tr><td valign="top"><font face="arial" size="4"><b>Try it out!</b></font></td></tr></table>'
linktext[5]='<table border="0" width="210" height="185" bgcolor="#C2D7FC" cellpadding="8" cellspacing="0"><tr><td valign="top"><font face="arial" size="4"><b>Try it out now!</b></font></td></tr></table>'
var ns6=document.getElementById&&!document.all
var ie=document.all
function show_text(thetext, whichdiv){
if (ie) eval("document.all."+whichdiv).innerHTML=linktext[thetext]
else if (ns6) document.getElementById(whichdiv).innerHTML=linktext[thetext] }
function reset(whichdiv){
if (ie) eval("document.all."+whichdiv).innerHTML='<table border="0" width="210" height="185" bgcolor="#F88530" cellpadding="0" cellspacing="8"><tr><td valign="top"><font face="arial" size="4"><b>place your cursor over the links on the left for a description to appear here.<p>click on the link to visit the page</b></font></td></tr></table>'
else if (ns6) document.getElementById(whichdiv).innerHTML='<table border="0" width="210" height="185" bgcolor="#F88530" cellpadding="8" cellspacing="0"><tr><td valign="top"><font face="arial" size="4"><b>place your cursor over the links on the left for a description to appear here.<p>click on the link to visit the page</b></font></td></tr></table>'}
// End -->
</script>
</HEAD>
<BODY>
<table border="0" width="370" bgcolor="black" cellpadding="3" cellspacing="0" align="center">
<tr><td>
<table border="0" background="stuff/index_background.gif" width="370" cellpadding="0" cellspacing="0">
<tr><td>
<table border="0" width="160" bgcolor="#F88530" cellpadding="8" cellspacing="0">
<tr>
<td onclick="window.location='http://javascript.internet.com'" onmouseover="bgColor='#EFEFEF'; show_text(0,'div1')" onmouseout="bgColor='#F88530'; reset('div1')" style="cursor:pointer; cursor:hand"><font face="arial" size="4"><b>Try this link</b></font></td>
</tr>
<tr>
<td onclick="window.location='http://javascript.internet.com'" onMouseover="bgColor='#D1FD80'; show_text(1,'div1')" onMouseout="bgColor='#F88530'; reset('div1')" style="cursor:pointer; cursor:hand"><font face="arial" size="4"><b>Or another</b></font></td>
</tr>
<tr>
<td onclick="window.location='http://javascript.internet.com'" onMouseover="bgColor='#FDB9FD'; show_text(2,'div1')" onMouseout="bgColor='#F88530'; reset('div1')" style="cursor:pointer; cursor:hand"><font face="arial" size="4"><b>Our favorite</b></font></td>
</tr>
<tr>
<td onclick="window.location='http://javascript.internet.com'" onMouseover="bgColor='#FFFF5E'; show_text(3,'div1')" onMouseout="bgColor='#F88530'; reset('div1')" style="cursor:pointer; cursor:hand"><font face="arial" size="4"><b>Good site!</b></font></td>
</tr>
<tr>
<td onclick="window.location='http://javascript.internet.com'" onMouseover="bgColor='#C2D7FC'; show_text(4,'div1')" onMouseout="bgColor='#F88530'; reset('div1')" style="cursor:pointer; cursor:hand"><font face="arial" size="4"><b>Go here</b></font></td>
</tr>
<tr>
<td onclick="window.location='http://javascript.internet.com'" onMouseover="bgColor='#C2D7FC'; show_text(5,'div1')" onMouseout="bgColor='#F88530'; reset('div1')" style="cursor:pointer; cursor:hand"><font face="arial" size="4"><b>Go here now!</b></font></td>
</tr>
</table>
</td>
<td>
<span id="div1"><table border="0" width="210" height="185" bgcolor="#F88530" cellpadding="8" cellspacing="0"><tr><td valign="top"><font face="arial" size="4"><b>place your cursor over the links on the left for a description to appear here.<br><br>click on the link to visit the page</b></font></td></tr></table></span>
</td>
</tr>
</table>
</td>
</tr>
</table>
