I have a question for experienced webmasters... I think it's not possible, but...
I want to put a text or an image in a cell in a table. This is not too hard. The problem is that I want this cell and this cell only to dynamically change on each visit (or reload) of the page. And, as if it was not enough, I would like this to be compatible with XHTML 1.1. I don't know how I can do something like that. Maybe a javascript ?
Ultimately all things are known because you want to believe you know.
-Zensunni koan
The only way I can think of to make this happen is to use server-side language like PHP, JSP, or ASP.
I'm not sure if you need the image/text piece to change in a set pattern, according to some changing parameter (like time of day or database content, etc) or simply randomly, but any of these ways could be accomplished. Randomly would be easier, followed by parameter...at least that's my initial thoughts on the subject.
If you're looking for XHTML complience, stay away from tables for layout. Not that tables don't comply, but when used for layout they certainly go against the spirit.
What kind of experience do you have with server side languages?
I have no experience in server-side languages... I don't know anything about JSP or ASP. I am not bad in HTML so with a little training I will probably be able to do it in PHP.
Can you please quickly explain to me what should look like a PHP code randomly changing the content ?
And for the tables... You are probably right. It only did it this way because I hadn't found any other way.
Ultimately all things are known because you want to believe you know.
-Zensunni koan
Moon Shadow: Here is the script I used to make the GN logo randomly change when you reloaded it (it is static now but who knows what the future may bring?
[edit: so just replace the image names in the array with your own and that should work fine - its a little loose around the edges but it should work fine.
I'm also sure that this could be done client-side with JavaScript - I believe the old GN design did things this way so check it out - the principle is similarish]
Glad to help. Now that I look at the script a bit more, I recall that it was in fact Doc's original random logo script for the GN. Should add this to the top if you use it -
code:
<!--DocOzone's Javascript code, copyright 1998
// Feel free to borrow and modify this code,
// but be sure leave this credit in the source!
// Your pal, -Dr. Thaddeus Ozone-// .http://www.ozones.com/
Moon Shadow: Yep that is a good script. And if you wanted to use it in ASP or ColdFusion (or any other server-side scripting language) then it could easily be ported into that language with little effort.
DL:
quote:bastard child
I've always thought of it as the daughter site which we scrimped and saved to send to college or the clever cousin who got into law school