Rotating content for table cells

R

Royal Denning

I am designing a table with 2 columns and 20 rows. I want to insert
small images (each with a link) and a text title in each cell of the
table.

On refresh of the page, I would like to have the contents of each cell
(picture/link and associated text) rotate randomly.

Note that the text titles must remain with their associated picture
and link (I don't want to scramble all the elements--just rotate the
entire contents of the table cell).

Is there a script that will accomplish this? Thanks.
 
M

McKirahan

Royal Denning said:
I am designing a table with 2 columns and 20 rows. I want to insert
small images (each with a link) and a text title in each cell of the
table.

On refresh of the page, I would like to have the contents of each cell
(picture/link and associated text) rotate randomly.

Note that the text titles must remain with their associated picture
and link (I don't want to scramble all the elements--just rotate the
entire contents of the table cell).

Is there a script that will accomplish this? Thanks.

Perhaps this will give you some ideas.

Test "as is"; watch for word-wrap.

<html>
<head>
<title>rotate26.htm</title>
<script type="text/javascript">
function letters() {
var abc = "abcdefghijklmnopqrstuvwxyz";
var now = new Date();
var pos = now.getSeconds()%26;
var let = abc.substr(pos);
if (pos > 0) let += abc.substring(0,pos);
alert(pos + "\t" + let);
var url = "http://205.200.38.172/aagraphics/letters/letter?.jpg";
var src;
var txt = new Array();
var img = new Array();
for (var i=0; i<let.length; i++) {
src = "<a href='" + url + "' target='_blank'>"
src += "<img src='" + url + "'";
src += "border='0' width='109' height='83' alt='?'></a>";
img = src.replace(/\?/g,let.charAt(i));
txt = "<br>The Letter " + let.charAt(i).toUpperCase();
}
var j = 0;
var tab = new Array();
tab[j++] = "<table border='0' cellpadding='0' cellspacing='0'
width='218'>";
var mid = let.length/2;
for (var k=0; k<mid; k++) {
tab[j++] = "<tr height='100' valign='top'>";
tab[j++] = " <th width='109'>" + img[k] + txt[k] + "</th>";
tab[j++] = " <th width='109'>" + img[k+mid] + txt[k+mid] +
"</th>";
tab[j++] = "</tr>";
}
tab[j++] = "</table>";
document.write(tab.join(""));
}
letters();
</script>
</head>
<body>
</body>
</html>
 
R

Royal Denning

Thanks, McKirahan.

I'm still a bit of a newbie at Javascripting, so where do I enter the
values for the cells, images, text and urls?"
 
M

McKirahan

Royal Denning said:
Thanks, McKirahan.

I'm still a bit of a newbie at Javascripting, so where do I enter the
values for the cells, images, text and urls?"

This should be a little clearer.

<html>
<head>
<title>rotate10.htm</title>
<script type="text/javascript">
function numbers() {
var url = "http://www.scri8e.com/TTF/alphas/redgelharts/";
var gif = new Array();
gif[0] = "0.gif|Zero";
gif[1] = "1.gif|One";
gif[2] = "2.gif|Two";
gif[3] = "3.gif|Three";
gif[4] = "4.gif|Four";
gif[5] = "5.gif|Five";
gif[6] = "6.gif|Six";
gif[7] = "7.gif|Seven";
gif[8] = "8.gif|Eight";
gif[9] = "9.gif|Nine";
for (var i=0; i<gif.length; i++) {
gif = url + gif;
}
var hig = 82;
var wid = 46;
var wyd = wid*2;
var ten = "0123456789";
var mod = ten.length;
var now = new Date();
var pos = now.getSeconds()%mod;
var num = ten.substr(pos);
if (pos > 0) num += ten.substring(0,pos);
var col = new Array();
var src;
var sub;
var tmp;
for (var j=0; j<num.length; j++) {
sub = num.charAt(j);
tmp = gif[sub].split("|");
src = "<a href='" + tmp[0] + "' target='_blank'>"
src += "<img src='" + tmp[0] + "'";
src += "border='0' width='" + wid + "' height='" + hig + "'
alt=''></a>";
src += "<br>" + tmp[1];
col[j] = src;
}
var k = 0;
var tab = new Array();
tab[k++] = "<table border='0' cellpadding='0' cellspacing='0'
width='" + wyd + "'>";
var mid = num.length/2;
for (var l=0; l<mid; l++) {
tab[k++] = "<tr height='" + hig + "' valign='top'>";
tab[k++] = " <th width='" + wid + "'>" + col[l] + "</th>";
tab[k++] = " <th width='" + wid + "'>" + col[l+mid] + "</th>";
tab[k++] = "</tr>";
}
tab[k++] = "</table>";
document.write(tab.join(""));
}
numbers();
</script>
</head>
<body>
</body>
</html>

Modify the "gif" array to identify each image followed by a "|" followed by
the text for the image. Change "wid" and "hig" to the "width" and "height"
of the images. This will handle rotating ten images; I'll leave it toyou to
handle twenty.
 
R

Royal Denning

McK: It worked! Thanks so much.

My only remaining questions:

How do I plug in the separate URLS (relative links, such at one.htm,
two.htm, etc.) to each image,

and can I use the same script twice on a page (using different array
values, such at 11-20?

I really appreciate your patience and guidance on this.
 
D

Dr John Stockton

JRS: In article <Nzwqd.160663$HA.32847@attbi_s01>, dated Mon, 29 Nov
2004 03:20:18, seen in McKirahan
function numbers() {
var url = "http://www.topsearchspot.com/";
var gif = new Array(10);
gif[0] = "0.gif|Zero";
gif[1] = "1.gif|One";
gif[2] = "2.gif|Two";
gif[3] = "3.gif|Three";
gif[4] = "4.gif|Four";
gif[5] = "5.gif|Five";
gif[6] = "6.gif|Six";
gif[7] = "7.gif|Seven";
gif[8] = "8.gif|Eight";
gif[9] = "9.gif|Nine";
for (var i=0; i<gif.length; i++) {
gif = url + gif;
}


Only a list of the names of the digits is needed; javascript can
assemble the rest when needed.

var Digits = ["Zero", ..., "Nine"] // is simpler.
 
M

McKirahan

Royal Denning said:
McK: It worked! Thanks so much.

My only remaining questions:

How do I plug in the separate URLS (relative links, such at one.htm,
two.htm, etc.) to each image,

and can I use the same script twice on a page (using different array
values, such at 11-20?

I really appreciate your patience and guidance on this.

Not the most elegant code ....

<html>
<head>
<title>rotate20.htm</title>
<script type="text/javascript">
function numbers() {
var url = "http://www.topsearchspot.com/";
var gif = new Array(10);
// gif[#] = image | text | page
gif[0] = "0.gif|Zero|www.Google.com?00";
gif[1] = "1.gif|One|www.Google.com?01";
gif[2] = "2.gif|Two|www.Google.com?02";
gif[3] = "3.gif|Three|www.Google.com?03";
gif[4] = "4.gif|Four|www.Google.com?04";
gif[5] = "5.gif|Five|www.Google.com?05";
gif[6] = "6.gif|Six|www.Google.com?06";
gif[7] = "7.gif|Seven|www.Google.com?07";
gif[8] = "8.gif|Eight|www.Google.com?08";
gif[9] = "9.gif|Nine|www.Google.com?09";
gif[10] = "0.gif|Ten|www.Google.com?10";
gif[11] = "1.gif|Eleven|www.Google.com?11";
gif[12] = "2.gif|Twelve|www.Google.com?12";
gif[13] = "3.gif|Thirteen|www.Google.com?13";
gif[14] = "4.gif|Fourteen|www.Google.com?14";
gif[15] = "5.gif|Fifteen|www.Google.com?15";
gif[16] = "6.gif|Sixteen|www.Google.com?16";
gif[17] = "7.gif|Seventeen|www.Google.com?17";
gif[18] = "8.gif|Eighteen|www.Google.com?18";
gif[19] = "9.gif|Nineteen|www.Google.com?19";
for (var i=0; i<gif.length; i++) {
gif = url + gif;
}
var hig = 62;
var wid = 62;
// Change values above but not below.
var wyd = wid*2;
var xix = "0001020304050607080910111213141516171819";
var mod = xix.length/2;
var now = new Date();
var pos = now.getSeconds()%mod;
var num = xix.substr(pos*2-2);
if (pos > 0) num += xix.substring(0,pos*2-2);
var col = new Array();
var src;
var sub;
var tmp;
var k = 0;
for (var j=0; j<num.length; j++) {
sub = parseInt(num.substring(j,j+2),10);
tmp = gif[sub].split("|");
src = "<a href='http://" + tmp[2] + "' target='_blank'>"
src += "<img src='" + tmp[0] + "'";
src += "border='0' width='" + wid + "' height='" + hig + "'
alt=''></a>";
src += "<br>" + tmp[1];
col[k] = src;
j++;
k++;
}
var l = 0;
var tab = new Array();
tab[l++] = "<table border='0' cellpadding='0' cellspacing='0'
width='" + wyd + "'>";
var mid = num.length/4;
for (var m=0; m<mid; m++) {
tab[l++] = "<tr height='" + hig + "' valign='top'>";
tab[l++] = " <th width='" + wid + "'>" + col[m] + "</th>";
tab[l++] = " <th width='" + wid + "'>" + col[m+mid] + "</th>";
tab[l++] = "</tr>";
}
tab[l++] = "</table>";
document.write(tab.join(""));
}
numbers();
</script>
</head>
<body>
</body>
</html>

The twenty "gif" entries (0 - 19) contain three elements seperated by "|"
are the image name ("0.gif"), the text (e.g. "One"), and the page (e.g.
www.Google.com?01 -- the "http://" is prepended later). The page can be any
valid url; for example, "www.Google.com/index.html".

Change the "gif" array as well as "url", "wid", and "hig" to suit your
needs. This presumes that all images are in the same folder specified by
the "url" and that all images are the same width ("wid") and height ("hig").
 
M

McKirahan

Dr John Stockton said:
JRS: In article <Nzwqd.160663$HA.32847@attbi_s01>, dated Mon, 29 Nov
2004 03:20:18, seen in McKirahan
function numbers() {
var url = "http://www.topsearchspot.com/";
var gif = new Array(10);
gif[0] = "0.gif|Zero";
gif[1] = "1.gif|One";
gif[2] = "2.gif|Two";
gif[3] = "3.gif|Three";
gif[4] = "4.gif|Four";
gif[5] = "5.gif|Five";
gif[6] = "6.gif|Six";
gif[7] = "7.gif|Seven";
gif[8] = "8.gif|Eight";
gif[9] = "9.gif|Nine";
for (var i=0; i<gif.length; i++) {
gif = url + gif;
}


Only a list of the names of the digits is needed; javascript can
assemble the rest when needed.

var Digits = ["Zero", ..., "Nine"] // is simpler.


Simpler, yes -- but not applicable. If you had read the complete thread you
would see that my post was just an example of how to handle multiple images
and their corresponding text.
 
R

RobB

McKirahan said:
Dr John Stockton said:
JRS: In article <Nzwqd.160663$HA.32847@attbi_s01>, dated Mon, 29 Nov
2004 03:20:18, seen in McKirahan
function numbers() {
var url = "http://www.topsearchspot.com/";
var gif = new Array(10);
gif[0] = "0.gif|Zero";
gif[1] = "1.gif|One";
gif[2] = "2.gif|Two";
gif[3] = "3.gif|Three";
gif[4] = "4.gif|Four";
gif[5] = "5.gif|Five";
gif[6] = "6.gif|Six";
gif[7] = "7.gif|Seven";
gif[8] = "8.gif|Eight";
gif[9] = "9.gif|Nine";
for (var i=0; i<gif.length; i++) {
gif = url + gif;
}


Only a list of the names of the digits is needed; javascript can
assemble the rest when needed.

var Digits = ["Zero", ..., "Nine"] // is simpler.


Simpler, yes -- but not applicable. If you had read the complete thread you
would see that my post was just an example of how to handle multiple images
and their corresponding text.


Hmm...what about those with JS disabled? Not much help...

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>untitled</title>
<!-- DEMO ONLY -->
<base href="http://i.office.microsoft.com/i/0000/MR/" />
<!-- DEMO ONLY -->
<style type="text/css">

body {
font-size: 100%;
margin: 12px;
background: #000;
}
#container {
width: 458px;
margin: 10px auto;
}
#rotator1, #rotator2 {
float: left;
margin: 10px;
border-collapse: collapse;
border: 4px #fff;
border-style: groove ridge groove groove;
background: #000;
}
#rotator1 td, #rotator2 td {
text-align: center;
padding: 1px;
margin: 0;
}
td a:link, td a:visited {
font: normal 60% verdana, sans-serif;
color: #fff;
text-decoration: none;
}
td a:hover {
text-transform: uppercase;
}
td a img {
display: block;
border-width: 0;
}

</style>
<script type="text/javascript">
//<![CDATA[

var table_ids = [ 'rotator1' , 'rotator2' ];

function Rotator(table_id)
{
this.table = document.getElementById(table_id);
this.cells = this.table.getElementsByTagName('TD');
this.ncells = this.cells.length;
this.pix = [];
this.txt = [];
this.hrefs = [];
this.idx_array = new Array(this.ncells);

function read()
{
var cell, n = 0;
while (cell = this.cells.item(n++))
{
this.pix.push(cell.getElementsByTagName('IMG')[0].src);
this.txt.push(cell.getElementsByTagName('A')[0].lastChild.nodeValue);
this.hrefs.push(cell.getElementsByTagName('A')[0].href);
}
this.shuffle();
}
this.read = read;

function shuffle()
{
var idx, i, ind1, ind2, temp;
for (i = 0; i < this.ncells; ++i)
this.idx_array = i;
for (i = 0; i < this.ncells; ++i)
{
ind1 = Math.floor(Math.random() * this.ncells);
ind2 = Math.floor(Math.random() * this.ncells);
temp = this.idx_array[ind1];
this.idx_array[ind1] = this.idx_array[ind2];
this.idx_array[ind2] = temp;
}
this.write();
}
this.shuffle = shuffle;

function write()
{
var cell, el, idx, n = 0;
while (cell = this.cells.item(n))
{
idx = this.idx_array[n++];
cell.getElementsByTagName('IMG')[0].src = this.pix[idx];
(el = cell.getElementsByTagName('A')[0]).lastChild.nodeValue =
this.txt[idx];
el.href = this.hrefs[idx];
}
this.table.style.visibility = 'visible';
}
this.write = write;

this.read();
}

onload = function()
{
if (document.getElementById && document.createElement)
for (var i = 0; i < table_ids.length; ++i)
new Rotator(table_ids);
}

/* set initial visibility to hidden */
if (document.getElementById && document.createElement)
{
for (var s = '', i = 0; i < table_ids.length; ++i)
s += '#' + table_ids + ',';

document.write(

'<style type="text/css">' ,
s.replace(/,$/, '') ,
'{visibility:hidden;}' ,
'</style>'

);
}

/* demo only */
function dummy(link)
{
alert(link.href);
return false;
}

//]]>
</script>
</head>
<body>
<div id="container">
<table id="rotator1">
<tbody>
<tr>
<td><a href="#displays" onclick="return dummy(this)"><img
src="j0399/j0399836.gif" />displays</a></td>
<td><a href="#diskette" onclick="return dummy(this)"><img
src="j0323/j0323552.gif" />diskette</a></td>
</tr>
<tr>
<td><a href="#floppies" onclick="return dummy(this)"><img
src="j0233/j0233109.gif" />floppies</a></td>
<td><a href="#monitor" onclick="return dummy(this)"><img
src="j0316/j0316344.gif" />monitor</a></td>
</tr>
<tr>
<td><a href="#mouse" onclick="return dummy(this)"><img
src="j0382/j0382582.gif" />mouse</a></td>
<td><a href="#dishes" onclick="return dummy(this)"><img
src="j0237/j0237779.gif" />dishes</a></td>
</tr>
<tr>
<td><a href="#cams" onclick="return dummy(this)"><img
src="j0396/j0396846.gif" />cams</a></td>
<td><a href="#pcs" onclick="return dummy(this)"><img
src="j0399/j0399981.gif" />pcs</a></td>
</tr>
<tr>
<td><a href="#birds" onclick="return dummy(this)"><img
src="j0198/j0198718.gif" />birds</a></td>
<td><a href="#recycle" onclick="return dummy(this)"><img
src="j0323/j0323582.gif" />recycle</a></td>
</tr>
</tbody>
</table>
<table id="rotator2">
<tbody>
<tr>
<td><a href="#kitty" onclick="return dummy(this)"><img
src="j0326/j0326434.gif" />kitty</a></td>
<td><a href="#kite" onclick="return dummy(this)"><img
src="j0231/j0231947.gif" />kite</a></td>
</tr>
<tr>
<td><a href="#telescope" onclick="return dummy(this)"><img
src="j0287/j0287221.gif" />telescope</a></td>
<td><a href="#keys" onclick="return dummy(this)"><img
src="j0287/j0287325.gif" />keys</a></td>
</tr>
<tr>
<td><a href="#earth" onclick="return dummy(this)"><img
src="j0400/j0400664.gif" />earth</a></td>
<td><a href="#choo-choo" onclick="return dummy(this)"><img
src="j0234/j0234231.gif" />choo-choo</a></td>
</tr>
<tr>
<td><a href="#bus" onclick="return dummy(this)"><img
src="j0395/j0395931.gif" />bus</a></td>
<td><a href="#chips" onclick="return dummy(this)"><img
src="j0318/j0318944.gif" />bull !</a></td>
</tr>
<tr>
<td><a href="#shot-put" onclick="return dummy(this)"><img
src="j0303/j0303464.gif" />shot-put</a></td>
<td><a href="#pointer" onclick="return dummy(this)"><img
src="j0281/j0281730.gif" />pointer</a></td>
</tr>
</tbody>
</table>
</div>
</body>
</html>
 
M

Michael Winter

[snip]
Hmm...what about those with JS disabled? Not much help...

[snip]

Well, it was asked in a JS group which begs for a JS solution.

So? A document that uses Javascript should never fail just because that
*optional* technology is disabled. A controlled environment might give you
more freedom, but as far as the Web is concerned, client-side scripting
should be an enhancement only.

Mike
 
M

McKirahan

Michael Winter said:
[snip]
Hmm...what about those with JS disabled? Not much help...

[snip]

Well, it was asked in a JS group which begs for a JS solution.

So? A document that uses Javascript should never fail just because that
*optional* technology is disabled. A controlled environment might give you
more freedom, but as far as the Web is concerned, client-side scripting
should be an enhancement only.

Mike

Got it! I didn't reflect on my solution's total dependence on JS.
 
D

Dr John Stockton

JRS: In article <l7Kqd.118122$5K2.23354@attbi_s03>, dated Mon, 29 Nov
2004 18:45:37, seen in McKirahan
Dr John Stockton said:
JRS: In article <Nzwqd.160663$HA.32847@attbi_s01>, dated Mon, 29 Nov
2004 03:20:18, seen in McKirahan
function numbers() {
var url = "http://www.topsearchspot.com/";
var gif = new Array(10);
gif[0] = "0.gif|Zero";
gif[1] = "1.gif|One";
gif[2] = "2.gif|Two";
gif[3] = "3.gif|Three";
gif[4] = "4.gif|Four";
gif[5] = "5.gif|Five";
gif[6] = "6.gif|Six";
gif[7] = "7.gif|Seven";
gif[8] = "8.gif|Eight";
gif[9] = "9.gif|Nine";
for (var i=0; i<gif.length; i++) {
gif = url + gif;
}


Only a list of the names of the digits is needed; javascript can
assemble the rest when needed.

var Digits = ["Zero", ..., "Nine"] // is simpler.


Simpler, yes -- but not applicable. If you had read the complete thread you
would see that my post was just an example of how to handle multiple images
and their corresponding text.


It is always simpler to load a (non-sparse) array using that notation,
rather than element by element.

It is rarely beneficial to repeat material (ten of .gif|) which can
readily be inserted programmatically.
 
R

Royal Denning

Well, I customized the script with images and it's working well.

I have another question.

Is it possible to use the script again on the same page with another
ten images so that list one rotates its ten images, and the second
script rotates its ten imagea independently?

I've been experimenting with this with so-so results so far...
 
M

McKirahan

Royal Denning said:
Well, I customized the script with images and it's working well.

I have another question.

Is it possible to use the script again on the same page with another
ten images so that list one rotates its ten images, and the second
script rotates its ten imagea independently?

I've been experimenting with this with so-so results so far...

Copy and rename the function then call it.
 
R

RobB

Richard Cornford said:
RobB wrote:


<snip>

Currently there are no XHTML DOM implementations that support
document.write.

Richard.

Oops, busted. Miss it already. Here's another stab at it....

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>untitled</title>
<!-- DEMO ONLY -->
<base href="http://i.office.microsoft.com/i/0000/MR/" />
<!-- DEMO ONLY -->
<style type="text/css">

body {
font-size: 100%;
margin: 12px;
background: #456;
}
#container {
width: 468px;
margin: 10px auto;
}
#rotator1, #rotator2 {
float: left;
margin: 10px;
border-collapse: collapse;
border: 2px #fff dashed;
background: #fff;
}
#rotator1 td, #rotator2 td {
text-align: center;
padding: 3px;
margin: 0;
border: 1px #bbb dashed;
}
td a:link, td a:visited {
font: normal 60% "comic sans ms", sans-serif;
color: #000;
text-decoration: none;
}
td a:hover {
text-transform: uppercase;
}
td a img {
display: block;
padding: 0;
margin: 0;
border-width: 0;
}

</style>
<script type="text/javascript">
//<![CDATA[

/**********************************************/
var table_ids = [ 'rotator1' , 'rotator2' ];
/**********************************************/

var alldivs = document.getElementsByTagName('DIV');

function Rotator(table_id)
{
this.table = document.getElementById(table_id);
this.cells = this.table.getElementsByTagName('TD');
this.ncells = this.cells.length;
this.pix = [];
this.txt = [];
this.hrefs = [];
this.idx_array = new Array(this.ncells);

function read()
{
var cell, n = 0;
while (cell = this.cells.item(n++))
{
this.pix.push(cell.getElementsByTagName('IMG')[0].src);
this.txt.push(cell.getElementsByTagName('A')[0].lastChild.nodeValue);
this.hrefs.push(cell.getElementsByTagName('A')[0].href);
} this.shuffle();
}
this.read = read;

function shuffle()
{
var idx, i, ind1, ind2, temp;
for (i = 0; i < this.ncells; ++i)
this.idx_array = i;
for (i = 0; i < this.ncells; ++i)
{
ind1 = Math.floor(Math.random() * this.ncells);
ind2 = Math.floor(Math.random() * this.ncells);
temp = this.idx_array[ind1];
this.idx_array[ind1] = this.idx_array[ind2];
this.idx_array[ind2] = temp;
} this.write();
}
this.shuffle = shuffle;

function write()
{
var cell, el, idx, n = 0;
while (cell = this.cells.item(n))
{
idx = this.idx_array[n++];
cell.getElementsByTagName('IMG')[0].src = this.pix[idx];
(el = cell.getElementsByTagName('A')[0]).lastChild.nodeValue =
this.txt[idx];
el.href = this.hrefs[idx];
} alldivs.item(0).style.visibility = 'visible';
}
this.write = write;

this.read();
}

onload = function()
{
if (document.getElementById && document.createElement)
for (var i = 0; i < table_ids.length; ++i)
new Rotator(table_ids);
}

/* demo only */
function dummy(link)
{
alert(link.href.toUpperCase().match(/[^#]*$/));
return false;
}

//]]>
</script>
</head>
<body>
<div id="container">
<script type="text/javascript">
//<![CDATA[
alldivs.item(0).style.visibility = 'hidden';
//]]>
</script>
<table id="rotator1">
<tbody>
<tr>
<td><a href="#displays" onclick="return dummy(this)">
<img src="j0399/j0399836.gif" />displays</a></td>
<td><a href="#diskette" onclick="return dummy(this)">
<img src="j0323/j0323552.gif" />diskette</a></td>
</tr><tr>
<td><a href="#floppies" onclick="return dummy(this)">
<img src="j0233/j0233109.gif" />floppies</a></td>
<td><a href="#monitor" onclick="return dummy(this)">
<img src="j0316/j0316344.gif" />monitor</a></td>
</tr><tr>
<td><a href="#mouse" onclick="return dummy(this)">
<img src="j0382/j0382582.gif" />mouse</a></td>
<td><a href="#dishes" onclick="return dummy(this)">
<img src="j0237/j0237779.gif" />dishes</a></td>
</tr><tr>
<td><a href="#cams" onclick="return dummy(this)">
<img src="j0396/j0396846.gif" />cams</a></td>
<td><a href="#pcs" onclick="return dummy(this)">
<img src="j0399/j0399981.gif" />pcs</a></td>
</tr><tr>
<td><a href="#birds" onclick="return dummy(this)">
<img src="j0198/j0198718.gif" />birds</a></td>
<td><a href="#recycle" onclick="return dummy(this)">
<img src="j0323/j0323582.gif" />recycle</a></td>
</tr>
</tbody>
</table>

<table id="rotator2">
<tbody>
<tr>
<td><a href="#kitty" onclick="return dummy(this)">
<img src="j0326/j0326434.gif" />kitty</a></td>
<td><a href="#kite" onclick="return dummy(this)">
<img src="j0231/j0231947.gif" />kite</a></td>
</tr><tr>
<td><a href="#telescope" onclick="return dummy(this)">
<img src="j0287/j0287221.gif" />telescope</a></td>
<td><a href="#keys" onclick="return dummy(this)">
<img src="j0287/j0287325.gif" />keys</a></td>
</tr><tr>
<td><a href="#earth" onclick="return dummy(this)">
<img src="j0400/j0400664.gif" />earth</a></td>
<td><a href="#choo-choo" onclick="return dummy(this)">
<img src="j0234/j0234231.gif" />choo-choo</a></td>
</tr><tr>
<td><a href="#bus" onclick="return dummy(this)">
<img src="j0395/j0395931.gif" />bus</a></td>
<td><a href="#bull" onclick="return dummy(this)">
<img src="j0318/j0318944.gif" />bull !</a></td>
</tr><tr>
<td><a href="#shot-put" onclick="return dummy(this)">
<img src="j0303/j0303464.gif" />shot-put</a></td>
<td><a href="#pointer" onclick="return dummy(this)">
<img src="j0281/j0281730.gif" />pointer</a></td>
</tr>
</tbody>
</table>
</div>
</body>
</html>
 
D

Dr John Stockton

JRS: In article <opsh9x9z1mx13kvk@atlantis>, dated Tue, 30 Nov 2004
10:59:52, seen in Michael Winter <M.Winter@bl
ueyonder.co.invalid> posted :
So? A document that uses Javascript should never fail just because that
*optional* technology is disabled. A controlled environment might give you
more freedom, but as far as the Web is concerned, client-side scripting
should be an enhancement only.

Really?
How about <URL:http://www.merlyn.demon.co.uk/astro.htm#Calc>, for
example? Or some of my other pages?

It's a mistake to assume that all javascript on the Web is for
transactions, or that all hosts offer programmable servers.

My pages are designed so that any CPU power used other than for sending
the page is supplied by the fetcher of the page.

One could say that disabling javascript should never prevent some form
of display, and that that display should be designed and not merely
fortuitous. And that disabling javascript should not prevent
transactions.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,774
Messages
2,569,599
Members
45,175
Latest member
Vinay Kumar_ Nevatia
Top