WebsiteX5.info - The ultimate guide for Incomedia's WebsiteX5

Search this site

Go to content

Main menu:


Alt-text for images without having to create a link...

How to... > Images

Courtesy of Gunslinger!

You want to have an Alt-text for your images? But you don't want to define a dummy link for each image?

In the 'Object insertion' dialog add an extra row at the bottom of the page. Insert a HTML Code object in this row. Double click it and insert the following code.


<script>
var images = document.getElementsByTagName('img');
for (i = 0; i < images.length; i++)
{
images[i].title = images[i].alt;
}
</script>

For each image the alt-text you have entered when you placed the image is copy to the title-tag. Now when you hover over the image a tooltip with the alt-text is shown.

Try it on the first two images.

A nice, standard WX5 alternative is to add a popup-image link of the same picture. Just click on the third image to get the idea...



Just a flower
\\opslag\fotos\2009 - Vakantie Buckie\23 november 2009\DSCF0010.JPG
Error File Open Error
\\opslag\fotos\2009 - Vakantie Buckie\23 november 2009\DSCF0010.JPG
Error File Open Error

Sub-Menu:


Back to content | Back to main menu