Time to use CSS.
There's a good reference at www.devguru.com
Basically, set a class for the titles.
a.title {
color:
position-abolute: top 55px left 200px;
}In JavaScript you can then set the objects color to another value as needed.
This will do what you want.
Collin
At 10:38 2005.03.19 -0500, you wrote:
Date: Sat, 19 Mar 2005 13:42:16 +0100 From: Frantisek <[EMAIL PROTECTED]> To: PDML <[email protected]> Subject: OT: HTML/JS help Message-ID: <[EMAIL PROTECTED]> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit
Hi, sorry to ask this on PDML, but there are some pretty technical people here. And it's concerning photography, at least the showing of photographs on the web :-)
Please reply off-list to not clutter the list, thank you.
I am redesigning my website, handcoding mostly, and my deficiencies in programming/scripting languages finally showed up - I want some simple JS functionality like selecting a random photo from array of ten for the frontpage and showing the correct link to the larger version. However, I can't figure out how to do it. I am just a JS newbie... I am still learning as I go, migrating to CSS plus little JS and maybe later even abandoning tables completely in favour of CSS2 positioning.
I have used an array in JS to select a photo from list of ten photographs at random. I wanted to display that photo on my website (www.frantisekvlcek.com) as one of "last works". On the right of it would be a list of all ten photos from the list. The randomly selected one should be rendered bold (or differnent colour) in the list, and a link at bottom of it (or clicking the photo) should take the viewer to the page with the photo in bigger size and caption. Also, using onmouseover and onmouseout, one would see the photo change when the viewer moved the mouse over the list (with the photo title currently under the cursor rendered in italics or different colour). Maybe even each photo title in the textual list on the right could be a link in itself to the bigger version. You can see a test page with the changing of photos onmouseover at frantisekvlcek.com/indextemp.html (the code for randomising the photo is still in testing, and not implemented even in the test version). In the final version, I will use absoute: positioning to avoid the annoying flicker of the text below if the image size is not consitent in all the photos. I will also use JS to preload the images before the page loads, to speed up the changing of them, and maybe make them smaller so it's all faster. But these are tweaks for finalising the design, after I complete the funcitonality.
I got as far as showing the big photo randomly, but here the problems started...
The way I wanted to implement it was having a style sheet "random" which would colour the randomly selected photo's title differntly to show viewers which randomly selected photo goes with what title from the list. I am completely at a loss how to do this. That is showing a random photo from array of several names works fine (using 'array' in JS), but how to make the title name of the randomly selected photo differenciated from the rest of the list (e.g. bold) while changing the image link so clicking on the image would take the viewer to the correct picture?
Sorry for such a non-photographic question, and sorry for such a dumb html coding ;-)
Any help much appretiated.
Good light! fra

