Hello, John. I am not only a native speaker of English, I've been paid
to write it professionally for most of my adult life.
If I was brief and informal it was because I didn't think anyone on
the newsgroup wanted to read a long, detailed message about what I
wanted (perhaps I was wrong in that, but that was my instinct). In any
case, McKirahan figured out what I was asking for easily enough, so I
don't think it was that unclear.
But I wouldn't mind reiterating what I was looking for originally.
What I was hoping for was a Javascript that would populate the cells
of an HTML table with images and text (and relative hyperlinks to
other pages on the site) from a folder on the website I'm working on.
Upon refreshing the page, the contents of the cells would shuffle
randomly. For a visual example of the shuffling process, see
http://www.topsearchspot.com/rotate10.htm.
McKirahan helpfully supplied a Javascript that built the table and
shuffled the cell contents accordingly, but given my limited knowledge
of Javascript, maybe it would be better to ask for a script that
populates the cells of a pre-built html table. Whichever would be
easier for someone with limited Jscript knowledge to customize.
Anyway, after some testing with McKirahan's scripts I've decided I
need a table with 2 columns and 5 rows (as seen on the link above) and
a table with 1 column and ten rows. I've decided to include the text
as part of the images now, so the script would just populate the cells
of the table with images and relative hyperlinks, and the contents of
the cells would randomly shuffle whenever the page reloads. I would
also like to be able to add rows to the tables and still have them
shuffle correctly as more images become available. (For example, I'd
like to have the flexibility to add an eleventh row to the ten-row
table when the time comes).
As noted before, I'm open to other scripts that will accomplish this
(although I really appreciate McKirahan's efforts on my behalf so
far).
If I was briedDr John Stockton said:
JRS: In article <
[email protected]>, dated
Sat, 27 Nov 2004 13:25:51, seen in 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.
It's not clear what you mean by "rotate randomly" - by what sort of
angle? True text cannot be rotated, and images can only be replaces by
ones of different orientation. And is the rotation by a random amount,
or after a random interval?
If your native tongue is one of the better-known ones from the western
parts of the Continent (i.e. mainland Europe), then it might help if you
were to post both in that and in English.
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).
Or do the contents of cells seem to move from one cell to another? Do
they occur in, and maintain, a natural sequence, following each other
round; or do they move from cell to cell randomly, similarly to a deck
of cards being shuffled?
The more effort that you put into explain9ing your wants with absolute
clarity, the more likely it is that you will be shown efficient and
relevant code.
The code in your article dated 2 Dec 2004 09:48:33 -0800 is badly laid
out - code should be indented to show its intended structure - and
unnecessarily complex. As a minor example,
src = "<a href='" + tmp[0] + "' target='_blank'>"
src += "<img src='" + tmp[0] + "'";
src += "border='0' width='" + wid + "' height='" + hig + "'
can be written as
src = "<a href='" + tmp[0] + "' target='_blank'>" +
"<img src='" + tmp[0] + "'" +
"border='0' width='" + wid + "' height='" + hig + "' ;
which uses fewer characters and is IMHO easier to read and slightly
faster.