dan1st
03-22-2008, 01:32 PM
Hi, I've asked this elsewhere but no one seems to be able to help.
But I'm pretty sure it's simple! Just that I'm really no expert. I don't even know if this is called hypercell.
I'm certain this will be a piece of cake to the gurus out there.
I'm using this particular javascript technique whereby when a cell in a table has "onmouseover" the cell changes color, and when the cell has "onmouseout" it goes to a link.
A simple sample of the script is as follows (also attached):
<html>
<head>
<meta http-equiv="Content-Language" content="en-us">
<script type="text/javascript">
function link1(){
window.location.href="http://www.google.com/";
}
</script>
<script type="text/javascript">
function link2(){
window.location.href="http://www.yahoo.com/";
}
</script>
</head>
<body>
<center>
<table border="1" width="200" cellspacing="0" cellpadding="0" height="100">
<tr>
<td onmouseover="this.style.background='#F1F7FA';this.style.cursor='pointer'" onmouseout="this.style.background='white';" onclick="link1()" width="50%" align="center">
<p align="center">Link to Google</td>
<td width="50%" align="center">
</td>
</tr>
<tr>
<td onmouseover="this.style.background='#F1F7FA';this.style.cursor='pointer'" onmouseout="this.style.background='white';" onclick="link2()" width="50%" align="center">
Link to Yahoo!</td>
<td width="50%" align="center">
</td>
</tr>
</table>
</center>
</body>
</html>
This script works great. Just that:
1. How do we make the links open in a new window?
2. When we click on the cells, how do we parse the REFERRER info as well as the cookie info? I find that using this script just treats the click as a new click to the link, but I'm sure that some info can be parsed.
Thanks alot in advance to anyone who can give some advice.
But I'm pretty sure it's simple! Just that I'm really no expert. I don't even know if this is called hypercell.
I'm certain this will be a piece of cake to the gurus out there.
I'm using this particular javascript technique whereby when a cell in a table has "onmouseover" the cell changes color, and when the cell has "onmouseout" it goes to a link.
A simple sample of the script is as follows (also attached):
<html>
<head>
<meta http-equiv="Content-Language" content="en-us">
<script type="text/javascript">
function link1(){
window.location.href="http://www.google.com/";
}
</script>
<script type="text/javascript">
function link2(){
window.location.href="http://www.yahoo.com/";
}
</script>
</head>
<body>
<center>
<table border="1" width="200" cellspacing="0" cellpadding="0" height="100">
<tr>
<td onmouseover="this.style.background='#F1F7FA';this.style.cursor='pointer'" onmouseout="this.style.background='white';" onclick="link1()" width="50%" align="center">
<p align="center">Link to Google</td>
<td width="50%" align="center">
</td>
</tr>
<tr>
<td onmouseover="this.style.background='#F1F7FA';this.style.cursor='pointer'" onmouseout="this.style.background='white';" onclick="link2()" width="50%" align="center">
Link to Yahoo!</td>
<td width="50%" align="center">
</td>
</tr>
</table>
</center>
</body>
</html>
This script works great. Just that:
1. How do we make the links open in a new window?
2. When we click on the cells, how do we parse the REFERRER info as well as the cookie info? I find that using this script just treats the click as a new click to the link, but I'm sure that some info can be parsed.
Thanks alot in advance to anyone who can give some advice.